예제 #1
0
 public bool Equals(Vector4 other)
 {
     return(MathHelpers.Approximately(_x, other.x) && MathHelpers.Approximately(_y, other.y) && MathHelpers.Approximately(_z, other.z) && MathHelpers.Approximately(_w, other.w));
 }
예제 #2
0
 public bool Equals(Matrix3x3 other)
 {
     return(MathHelpers.Approximately(m00, other.m00) && MathHelpers.Approximately(m01, other.m01) && MathHelpers.Approximately(m02, other.m02) &&
            MathHelpers.Approximately(m10, other.m10) && MathHelpers.Approximately(m11, other.m11) && MathHelpers.Approximately(m12, other.m12) &&
            MathHelpers.Approximately(m20, other.m20) && MathHelpers.Approximately(m21, other.m21) && MathHelpers.Approximately(m22, other.m22));
 }
예제 #3
0
 public bool Equals(Quaternion other)
 {
     return(MathHelpers.Approximately(_v.x, other.x) && MathHelpers.Approximately(_v.y, other.y) && MathHelpers.Approximately(_v.z, other.z) && MathHelpers.Approximately(_w, other.w));
 }
예제 #4
0
 public bool Equals(Vector3 other)
 {
     return(MathHelpers.IsEqual(_x, other.x) && MathHelpers.IsEqual(_y, other.y) && MathHelpers.IsEqual(_z, other.z));
 }
예제 #5
0
 /// <summary>
 /// Returns true if this <see cref="Angles3"/> is equal to the specified <see cref="Angles3"/>.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(Angles3 other)
 {
     return(MathHelpers.Approximately(_x, other.x) && MathHelpers.Approximately(_y, other.y) && MathHelpers.Approximately(_z, other.z));
 }
예제 #6
0
 public bool Equals(Matrix3x4 other)
 {
     return(MathHelpers.IsEqual(m00, other.m00) && MathHelpers.IsEqual(m01, other.m01) && MathHelpers.IsEqual(m02, other.m02) && MathHelpers.IsEqual(m03, other.m03) &&
            MathHelpers.IsEqual(m10, other.m10) && MathHelpers.IsEqual(m11, other.m11) && MathHelpers.IsEqual(m12, other.m12) && MathHelpers.IsEqual(m13, other.m13) &&
            MathHelpers.IsEqual(m20, other.m20) && MathHelpers.IsEqual(m21, other.m21) && MathHelpers.IsEqual(m22, other.m22) && MathHelpers.IsEqual(m23, other.m23));
 }
예제 #7
0
 public bool Equals(Vector2 other)
 {
     return(MathHelpers.Approximately(_x, other.x) && MathHelpers.Approximately(_y, other.y));
 }
예제 #8
0
 public static float ToDegree(this float value)
 {
     return(MathHelpers.RadiansToDegrees(value));
 }
예제 #9
0
        /// <summary>
        /// Specify the ratio at which this entity is made invisible based on distance.
        /// Ratio is 0.0 - 1.0, with 1.0 being 100% visibility regardless of distance.
        /// </summary>
        /// <param name="viewDistanceRatio">View distance ratio.</param>
        public void SetViewDistanceRatio(float viewDistanceRatio)
        {
            viewDistanceRatio = MathHelpers.Clamp01(viewDistanceRatio);

            NativeHandle.SetViewDistRatio((int)(viewDistanceRatio * 255));
        }
예제 #10
0
파일: Vec3.cs 프로젝트: yonder/CryMono
        public void Normalize()
        {
            float fInvLen = MathHelpers.ISqrt(X * X + Y * Y + Z * Z);

            X *= fInvLen; Y *= fInvLen; Z *= fInvLen;
        }