예제 #1
0
파일: vec3.cs 프로젝트: yatagarasu25/MathEx
 public int CompareTo(vec3 other, float eps)
 {
     return(MathTypeTagFloat.gt(x, other.x, eps) ? 1
                         : MathTypeTagFloat.eq(x, other.x, eps) ? MathTypeTagFloat.gt(y, other.y, eps) ? 1
                                 : MathTypeTagFloat.eq(y, other.y, eps) ? MathTypeTagFloat.gt(z, other.z, eps) ? 1
                                         : MathTypeTagFloat.eq(z, other.z, eps) ? 0 : -1
                                 : -1
                         : -1);
 }
예제 #2
0
파일: vec3.cs 프로젝트: yatagarasu25/MathEx
        //
        // Operators
        //


        public bool Equals(vec3 other, float eps) => MathTypeTagFloat.eq(x, other.x, eps) && MathTypeTagFloat.eq(y, other.y, eps) && MathTypeTagFloat.eq(z, other.z, eps);