Advertisement
2002C Custom Controls/ Forms/ Menus #8665

DegreesToXYsubroutine

The DegreesToXYsubroutine, calculates the X (horizontal) and Y (vertical) coordinates of any point, measured in degrees, on the circumference of a circle or ellipse.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Public Sub DegreesToXY(CenterX As _
    Long, CenterY As Long, degree _
    As Double, radiusX As Long, _
    radiusY As Long, X As Long, Y _
    As Long)
Dim convert As Double
    convert = 3.141593 / 180 
    'pi divided by 180
    X = CenterX - (Sin(-degree * _
        convert) * radiusX)
    Y = CenterY - (Sin((90 + _
        (degree)) * convert) * radiusY)
End Sub
Original Comments (3)
Recovered from Wayback Machine