コード例 #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());
コード例 #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());
コード例 #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());
コード例 #4
0
ファイル: Squared.cs プロジェクト: spoconnor/TestClient
 public int CompareTo(Squared <T> other) => value.CompareTo(other.value);
コード例 #5
0
ファイル: Squared.cs プロジェクト: spoconnor/TestClient
 // ReSharper disable once CompareOfFloatsByEqualityOperator
 public bool Equals(Squared <T> other) => value == other.value;
コード例 #6
0
ファイル: Squared.cs プロジェクト: spoconnor/TestClient
 public static Squared <T> Max(Squared <T> s1, Squared <T> s2)
 => new Squared <T>(System.Math.Max(s1.NumericValue, s2.NumericValue));