public static float dist(Vec3i v1, Vec3i v2) { float dx = v1.x - v2.x; float dy = v1.y - v2.y; float dz = v1.z - v2.z; return(XMath.Sqrt(dx * dx + dy * dy + dz * dz)); }
public static Vec3i setZ(Vec3i v, int z) { return(new Vec3i(v.x, v.y, z)); }
public static Vec3i setY(Vec3i v, int y) { return(new Vec3i(v.x, y, v.z)); }
public static Vec3i setX(Vec3i v, int x) { return(new Vec3i(x, v.y, v.z)); }
public static bool Equals(Vec3i a, Vec3i b) { return(a.x == b.x && a.y == b.y && a.z == b.z); }
public static Vec3i cross(Vec3i v1, Vec3i v2) { return(new Vec3i(v1.y * v2.z - v1.z * v2.y, -(v1.x * v2.z - v1.z * v2.x), v1.x * v2.y - v1.y * v2.x)); }
public static float dot(Vec3i v1, Vec3i v2) { return(v1.x * v2.x + v1.y * v2.y + v1.z * v2.z); }