···6666 }
67676868 /// <summary>
6969+ /// Gets the direction the Danmaku is facing. Guarenteed to be a unit vector.
7070+ /// </summary>
7171+ public Vector2 Direction => GetDirection(Pool.Rotations[Id]);
7272+7373+ /// <summary>
6974 /// Gets or sets the speed of the Danmaku.
7075 /// </summary>
7176 /// <remarks>
···152157 Speed = state.Speed;
153158 AngularSpeed = state.AngularSpeed;
154159 Color = state.Color;
160160+ }
161161+162162+ /// <summary>
163163+ /// Convert a Danmaku rotation into a unit vector.
164164+ /// </summary>
165165+ /// <param name="rotation">the rotation of the Danmaku.</param>
166166+ /// <returns>the unit vector representing the way the bullet is facing.</returns>
167167+ public static Vector2 GetDirection(float rotation) {
168168+ return new Vector2(Mathf.Cos(rotation), Mathf.Sin(rotation));
155169 }
156170157171 public static bool operator ==(Danmaku lhs, Danmaku rhs) {