public override bool Equals(object obj) { if (obj == null || !(obj is Vector3Double)) { return(false); } Vector3Double v3 = (Vector3Double)obj; return(v3.x == x && v3.y == y && v3.z == z); }
public static Vector3Double Normalize(Vector3Double input) { double length = input.Length; return(new Vector3Double(input.x / length, input.y / length, input.z / length)); }
public static Vector3Double Round(Vector3Double v3, int dec) { return(new Vector3Double(Math.Round(v3.x, dec), Math.Round(v3.y, dec), Math.Round(v3.z, dec))); }
public static Vector3Double TwoVertexNormal(Vector3Double first, Vector3Double second) { return((first.z * second.x) - (first.x * second.z) < 0 ? (first.normalized + second.normalized).normalized * -1 : (first.normalized + second.normalized).normalized); }