A game about forced loneliness, made by TACStudios
1using System.Collections.Generic;
2using System.Linq;
3
4namespace Unity.VisualScripting
5{
6 /// <summary>
7 /// Returns the average of two or more scalars.
8 /// </summary>
9 [UnitCategory("Math/Scalar")]
10 [UnitTitle("Average")]
11 public sealed class ScalarAverage : Average<float>
12 {
13 public override float Operation(float a, float b)
14 {
15 return (a + b) / 2;
16 }
17
18 public override float Operation(IEnumerable<float> values)
19 {
20 return values.Average();
21 }
22 }
23}