using System.Collections.Generic; using System.Linq; namespace Unity.VisualScripting { /// /// Returns the average of two or more scalars. /// [UnitCategory("Math/Scalar")] [UnitTitle("Average")] public sealed class ScalarAverage : Average { public override float Operation(float a, float b) { return (a + b) / 2; } public override float Operation(IEnumerable values) { return values.Average(); } } }