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

◆ Reflect() [2/2]

static Vector2 Microsoft.Xna.Framework.Vector2.Reflect ( Vector2 vector,
Vector2 normal )
inlinestatic

Definition at line 157 of file Vector2.cs.

158 {
159 float num = vector.X * normal.X + vector.Y * normal.Y;
160 Vector2 result = default(Vector2);
161 result.X = vector.X - 2f * num * normal.X;
162 result.Y = vector.Y - 2f * num * normal.Y;
163 return result;
164 }
Vector2(float x, float y)
Definition Vector2.cs:35

References Microsoft.Xna.Framework.Vector2.X, and Microsoft.Xna.Framework.Vector2.Y.

Referenced by Terraria.Projectile.LightDisc_Bounce(), and Terraria.Physics.BallCollision.Step().