예제 #1
0
 /// <summary>
 /// Transforms a direction vector.
 /// </summary>
 public static V2f TransformDir(Rot2f rot, V2f v)
 {
     return((M22f)rot * v);
 }
예제 #2
0
 /// <summary>
 /// Inverse transforms a direction vector.
 /// </summary>
 public static V2f InvTransformDir(Rot2f rot, V2f v)
 {
     return((M22f)Rot2f.Negate(rot) * v);
 }
예제 #3
0
 /// <summary>
 /// Negates rotation.
 /// </summary>
 public static Rot2f Negate(Rot2f rot)
 {
     return(new Rot2f(-rot.Angle));
 }
예제 #4
0
 /// <summary>
 /// Divides scalar by a rotation.
 /// </summary>
 public static Rot2f Divide(Rot2f rot, float val)
 {
     return(new Rot2f(rot.Angle / val));
 }
예제 #5
0
 /// <summary>
 /// Multiplies 2 rotations.
 /// </summary>
 public static Rot2f Multiply(Rot2f r0, Rot2f r2)
 {
     return(new Rot2f(r0.Angle * r2.Angle));
 }
예제 #6
0
 public static M33f Multiply(Rot2f rot2, Rot3f rot3)
 {
     return(Rot2f.Multiply(rot2, (M33f)rot3));
 }
예제 #7
0
 public static M22f Multiply(Rot2f rot, M22f mat)
 {
     return((M22f)rot * mat);
 }