Example #1
0
 /// <summary>
 /// Creates a relative rotation from t0 to t1.
 /// </summary>
 /// <param name="r0"></param>
 /// <param name="r1"></param>
 /// <returns></returns>
 public static Rotation2d CreateRelative(Rotation2d r0, Rotation2d r1)
 {
     return(r1.Apply(r0.Inverse));
 }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="r0"></param>
 /// <param name="r1"></param>
 /// <returns></returns>
 public static Rotation2d Multiply(Rotation2d r0, Rotation2d r1)
 {
     return(r0.Apply(r1));
 }
Example #3
0
 /// <summary>
 /// Inverts this transformation in place.
 /// </summary>
 public void Invert()
 {
     Scale = 1.0 / Scale;
     Rotation.Invert();
     Translation = Rotation.Apply(-Translation) * Scale;
 }
Example #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="rotation"></param>
 /// <param name="vector"></param>
 public static Vec2d Multiply(Rotation2d rotation, Vec2d vector)
 {
     return(rotation.Apply(vector));
 }
Example #5
0
 /// <summary>
 /// Inverts this transformation in place.
 /// </summary>
 public void Invert()
 {
     Rotation.Invert();
     Translation = -Rotation.Apply(Translation);
 }