Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ RotatedBy() [2/2]

static Vector2D Terraria.Utils.RotatedBy ( this Vector2D spinningpoint,
double radians,
Vector2D center = default(Vector2D) )
inlinestatic

Definition at line 1142 of file Utils.cs.

1143 {
1144 //IL_000e: Unknown result type (might be due to invalid IL or missing references)
1145 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
1146 //IL_0010: Unknown result type (might be due to invalid IL or missing references)
1147 //IL_0015: Unknown result type (might be due to invalid IL or missing references)
1148 //IL_0016: Unknown result type (might be due to invalid IL or missing references)
1149 //IL_0017: Unknown result type (might be due to invalid IL or missing references)
1150 //IL_0021: Unknown result type (might be due to invalid IL or missing references)
1151 //IL_0029: Unknown result type (might be due to invalid IL or missing references)
1152 //IL_003d: Unknown result type (might be due to invalid IL or missing references)
1153 //IL_0045: Unknown result type (might be due to invalid IL or missing references)
1154 //IL_0050: Unknown result type (might be due to invalid IL or missing references)
1155 double num = Math.Cos(radians);
1156 double num2 = Math.Sin(radians);
1158 Vector2D result = center;
1159 result.X += val.X * num - val.Y * num2;
1160 result.Y += val.X * num2 + val.Y * num;
1161 return result;
1162 }
static double Cos(double d)
static double Sin(double a)

References System.Math.Cos(), and System.Math.Sin().