Nez.Portable/Math/Mathf.cs
/// <summary>
/// gets a point on the circumference of the circle given its center, radius and angle. 0 degrees is 3 o'clock.
/// </summary>
/// <returns>The on circle.</returns>
/// <param name="circleCenter">Circle center.</param>
/// <param name="radius">Radius.</param>
/// <param name="angleInDegrees">Angle in degrees.</param>
gets a point on the circumference of the circle given its center, radius and angle. 0 degrees is 3 o'clock.
gets a point on the circumference of the circle given its center radius and angle . 0 degrees is 3 o ' clock .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static Vector2 pointOnCircle(Vector2 circleCenter, float radius, float angleInDegrees)
        {
            var radians = MathHelper.ToRadians(angleInDegrees);
            return new Vector2
                       {
                           X = cos(radians) * radius + circleCenter.X,
                           Y = sin(radians) * radius + circleCenter.Y
                       };
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static Vector2 pointOnCircle ( Vector2 circleCenter , float radius , float angleInDegrees ) { var radians = MathHelper . ToRadians ( angleInDegrees ) ; return new Vector2 { X = cos ( radians ) * radius + circleCenter . X , Y = sin ( radians ) * radius + circleCenter . Y } ; }
gets a point on the circumference of the circle given its center, radius and angle.
gets a point on the circumference of the circle given its center radius and angle .
The on circle.
The on circle .
circleCenter
Vector2
None
radius
float
None
angleInDegrees
float
Angle in degrees.
Angle in degrees .