public static BitFloat Distance(BitVector3 a, BitVector3 b) { BitFloat x = a.x - b.x; BitFloat y = a.y - b.y; BitFloat z = a.z - b.z; return(BitMathUtil.Sqrt(x * x + y * y + z * z)); }
public static BitVector3 Cross(BitVector3 a, BitVector3 b) { BitFloat x = a.y * b.z - a.z * b.y; BitFloat y = a.z * b.x - a.x * b.z; BitFloat z = a.x * b.y - a.y * b.x; return(new BitVector3(x, y, z)); }
public static BitVector3 Create(Vector3 v) { return(new BitVector3(BitFloat.Create(v.x), BitFloat.Create(v.y), BitFloat.Create(v.z))); }
public BitVector3(BitFloat x, BitFloat y, BitFloat z) { this.x = x; this.y = y; this.z = z; }
public BitVector2(BitFloat x, BitFloat y) { this.x = x; this.y = y; }
public static BitVector2 Create(Vector2 vect) { return(new BitVector2(BitFloat.Create(vect.x), BitFloat.Create(vect.y))); }
public void Minus(BitVector2 v) { x = x - v.x; y = y - v.y; }
public void Add(BitVector2 v) { x = x + v.x; y = y + v.y; }