Exemplo n.º 1
0
 /// <summary>
 /// Returns the typed square root of the squared acceleration.
 /// </summary>
 public static Acceleration Sqrt(this Squared <Acceleration> square) => new Acceleration(square.NumericValue.Sqrted());
Exemplo n.º 2
0
 /// <summary>
 /// Returns the typed square root of the squared speed.
 /// </summary>
 public static Speed Sqrt(this Squared <Speed> square) => new Speed(square.NumericValue.Sqrted());
Exemplo n.º 3
0
 /// <summary>
 /// Returns the typed square root of the squared unit value.
 /// </summary>
 public static Unit Sqrt(this Squared <Unit> square) => new Unit(square.NumericValue.Sqrted());
Exemplo n.º 4
0
 public int CompareTo(Squared <T> other) => value.CompareTo(other.value);
Exemplo n.º 5
0
 // ReSharper disable once CompareOfFloatsByEqualityOperator
 public bool Equals(Squared <T> other) => value == other.value;
Exemplo n.º 6
0
 public static Squared <T> Max(Squared <T> s1, Squared <T> s2)
 => new Squared <T>(System.Math.Max(s1.NumericValue, s2.NumericValue));