//WARNING: untested public static Rot2f FromM22f(M22f m) { // cos(a) sin(a) //-sin(a) cos(a) if (m.M00 >= -1.0 && m.M00 <= 1.0) { return(new Rot2f((float)System.Math.Acos(m.M00))); } else { throw new ArgumentException("Given M22f is not a Rotation-Matrix"); } }
/// <summary> /// Multiplacation of a <see cref="Scale3f"/> with a <see cref="M22f"/>. /// </summary> public static M33f Multiply(Scale3f scale, M22f mat) { return(new M33f(scale.X * mat.M00, scale.X * mat.M01, 0, scale.Y * mat.M10, scale.Y * mat.M11, 0, 0, 0, scale.Z)); }
/// <summary> /// </summary> public static M3__s3f__ operator *(__e3t__ r3, Rot2f r2) { M3__s3f__ m33 = (M3__s3f__)r3; M22f m22 = (M22f)r2; return(new M3__s3f__( m33.M00 * m22.M00 + m33.M01 * m22.M10, m33.M00 * m22.M01 + m33.M01 * m22.M11, m33.M02, m33.M10 * m22.M00 + m33.M11 * m22.M10, m33.M10 * m22.M01 + m33.M11 * m22.M11, m33.M12, m33.M20 * m22.M00 + m33.M21 * m22.M10, m33.M20 * m22.M01 + m33.M21 * m22.M11, m33.M22 )); }
/// <summary> /// </summary> public static M33f operator *(Euclidean3f r3, Rot2f r2) { M33f m33 = (M33f)r3; M22f m22 = (M22f)r2; return(new M33f( m33.M00 * m22.M00 + m33.M01 * m22.M10, m33.M00 * m22.M01 + m33.M01 * m22.M11, m33.M02, m33.M10 * m22.M00 + m33.M11 * m22.M10, m33.M10 * m22.M01 + m33.M11 * m22.M11, m33.M12, m33.M20 * m22.M00 + m33.M21 * m22.M10, m33.M20 * m22.M01 + m33.M21 * m22.M11, m33.M22 )); }
public static M23f Multiply(M22f m, Euclidean2f r) { return(M23f.Multiply(m, (M23f)r)); }
/// <summary> /// Creates a rigid transformation from a rotation matrix <paramref name="rot"/> and a (subsequent) translation <paramref name="trans"/>. /// </summary> public Euclidean2f(M22f rot, V2f trans) { Rot = Rot2f.FromM22f(rot); Trans = trans; }
public static M22f Multiply(Rot2f rot, M22f mat) { return((M22f)rot * mat); }