public static float Sqr(Vec4 v) { return v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; }
//public static implicit operator string(Vec4 v) //{ // return Convert.ToString(v.x) + ", " + Convert.ToString(v.y) + ", " + Convert.ToString(v.z) + ", " + Convert.ToString(v.w); //} private bool Eq(Vec4 other) { return(x.SimilarTo(other.x) && y.SimilarTo(other.y) && z.SimilarTo(other.z) && w.SimilarTo(other.w)); }
public static float Dot(Vec4 u, Vec4 v) { return u.x * v.x + u.y * v.y + u.z * v.z + u.w * v.w; }