Exemple #1
0
 public static Vector2 RotateAroundOrigin(this Vector2 point, Vector2 origin, float radians)
 {
     return(Vector2.Transform(point - origin, Quaternion.RotationYawPitchRoll(radians, 0, 0)) + origin);
 }
Exemple #2
0
 public static void RotateAroundOrigin(this Vector2 point, ref Vector2 origin, ref float radians, out Vector2 vector)
 {
     vector = Vector2.Transform(point - origin, Quaternion.RotationYawPitchRoll(radians, 0, 0)) + origin;
 }