C4 Engine Terathon Software C4 Engine API Documentation

• Math Library

API Links
Developer Links

CosSin

Defined in:  C4Math.h
Calculates the sine and cosine of an angle simultaneously.
Prototype

Vector2D CosSin(float f);

Parameters
f The angle for which to calculate sine and cosine, in radians.
Description
The CosSin function returns a Vector2D object for which the x coordinate contains the cosine of the angle specified by the f parameter and the y coordinate contains its sine.

This function executes with much higher performance compared to calculating the sine and cosine separately.
See Also

Math::GetTrigTable