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)); }
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)); }
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)); }
public bool Equals(Vector3 other) { return(MathHelpers.IsEqual(_x, other.x) && MathHelpers.IsEqual(_y, other.y) && MathHelpers.IsEqual(_z, other.z)); }
/// <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)); }
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)); }
public bool Equals(Vector2 other) { return(MathHelpers.Approximately(_x, other.x) && MathHelpers.Approximately(_y, other.y)); }
public static float ToDegree(this float value) { return(MathHelpers.RadiansToDegrees(value)); }
/// <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)); }
public void Normalize() { float fInvLen = MathHelpers.ISqrt(X * X + Y * Y + Z * Z); X *= fInvLen; Y *= fInvLen; Z *= fInvLen; }