Sin

fixed Sin (int angle)

Usage

Returns the value for the sine of angle.

Parameters

Return value

Returns the fixed point value of the sine.

Example

This script spawns two Medikits on the left and right side of the activator when activated.

script 1 (void)
{
    int x = GetActorX (0);
    int y = GetActorY (0);
    int z = GetActorZ (0) + 32.0;
    int angle = GetActorAngle (0);

    Spawn ("Medikit", x + cos (angle + 0.25) * 32, y + sin (angle + 0.25) * 32, z);
    Spawn ("Medikit", x + cos (angle + 0.75) * 32, y + sin (angle + 0.75) * 32, z);
}

See also

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.