public LSL_Vector(LSL_Vector vector) { x = (float)vector.x; y = (float)vector.y; z = (float)vector.z; }
public static LSL_Vector Norm(LSL_Vector vector) { double mag = Mag(vector); return new LSL_Vector(vector.x / mag, vector.y / mag, vector.z / mag); }
public static LSL_Vector Cross(LSL_Vector v1, LSL_Vector v2) { return new LSL_Vector ( v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x ); }
public static double Mag(LSL_Vector v) { return Math.Sqrt(v.x * v.x + v.y * v.y + v.z * v.z); }
public static double Dot(LSL_Vector v1, LSL_Vector v2) { return (v1.x * v2.x) + (v1.y * v2.y) + (v1.z * v2.z); }