public Vec3f Apply(Vec3f v) { return(new Vec3f(matrix[0, 0] * v.x + matrix[0, 1] * v.y + matrix[0, 2] * v.z, matrix[1, 0] * v.x + matrix[1, 1] * v.y + matrix[1, 2] * v.z, matrix[2, 0] * v.x + matrix[2, 1] * v.y + matrix[2, 2] * v.z)); }
public static Vec3f Cross(Vec3f a, Vec3f b) { return(new Vec3f(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x)); }
public static float Dot(Vec3f a, Vec3f b) { return(a.x * b.x + a.y * b.y + a.z * b.z); }
public Vec3f Cross(Vec3f other) { return(Cross(this, other)); }
public float Dot(Vec3f other) { return(Dot(this, other)); }