VgaGames4

VgaGames4 - miscellaneous man-pages

[.. upper level ..]

# vg4->misc->xy_from_angle()

Return x-/y-direction (based on 1 pixel) of a given angle.

SYNTAX
int vg4->misc->xy_from_angle(int angle, int *xdelta, int *ydelta)
FUNCTION PARAMETERS

angle | Angle in degrees
xdelta | For returning x-direction in 1/100 pixels
ydelta | For returning y-direction in 1/100 pixels

RETURN VALUE
Returns the angle eventually corrected, from 0 to 359
DESCRIPTION
Return x-/y-direction (based on 1 pixel) of a given angle.
EXAMPLE

    int angle, xdelta, ydelta;

    /* angle shall be 60 */
    angle = 60;

    vg4->misc->xy_from_angle(angle, &xdelta, &ydelta);
    /* now xdelta is 87, ydelta is -50 */

SEE ALSO
vg4->misc->angle_from_xy()