public static double AngleBetween(Vector3d from, Vector3d to) { return(Mathd.Acos(Mathd.Clamp(Dot(from.normalized, to.normalized), -1d, 1d))); }
public static Vector3d Max(Vector3d lhs, Vector3d rhs) { return(new Vector3d(Mathd.Max(lhs.x, rhs.x), Mathd.Max(lhs.y, rhs.y), Mathd.Max(lhs.z, rhs.z))); }
public static Vector3d Lerp(Vector3d from, Vector3d to, double t) { t = Mathd.Clamp01(t); return(new Vector3d(from.x + (to.x - from.x) * t, from.y + (to.y - from.y) * t, from.z + (to.z - from.z) * t)); }
public static double Angle(Vector3d from, Vector3d to) { return(Mathd.Acos(Mathd.Clamp(Dot(from.normalized, to.normalized), -1d, 1d)) * 57.29578d); }
public static Vector2d Max(Vector2d lhs, Vector2d rhs) { return(new Vector2d(Mathd.Max(lhs.x, rhs.x), Mathd.Max(lhs.y, rhs.y))); }