コード例 #1
0
 /// <summary>
 /// Check whether two spheres are the same within specified tolerance.
 /// </summary>
 /// <param name="other">The other sphere.</param>
 /// <param name="tolerance">Error Tolerance.</param>
 /// <returns>true if spheres are equal within specified tolerance, otherwise false.</returns>
 public bool Equals(FSphere other, float tolerance = FMath.KindaSmallNumber)
 {
     return(Center.Equals(other.Center, tolerance) && FMath.Abs(W - other.W) <= tolerance);
 }
コード例 #2
0
ファイル: FTwoVectors.cs プロジェクト: GameSciencePub/USharp
 /// <summary>
 /// Error-tolerant comparison.
 /// </summary>
 /// <param name="v">The other pair.</param>
 /// <param name="tolerance">Error Tolerance.</param>
 /// <returns>true if two pairs are equal within specified tolerance, false otherwise..</returns>
 public bool Equals(FTwoVectors v, float tolerance)
 {
     return(V1.Equals(v.V1, tolerance) && V2.Equals(v.V2, tolerance));
 }
コード例 #3
0
ファイル: FTransform.cs プロジェクト: Pro-Swapper/ProSwapper
 public bool Equals(FTransform other, float tolerance = FVector.KindaSmallNumber)
 {
     return(Rotation.Equals(other.Rotation, tolerance) && Translation.Equals(other.Translation, tolerance) && Scale3D.Equals(other.Scale3D, tolerance));
 }