warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
floattan
warning
This function starts with a lowercase letter.
Description
Get the tangent from a given angle. The input angle may be in radians, degrees or grades.
Name | Description |
---|---|
Float:value | The angle from which to get the tangent. |
anglemode | The angle mode to use, depending on the value entered. (default: radian) |
Returns
The tangent from the value entered.
Examples
public OnGameModeInit()
{
printf("The tangent from 30° is %.0f", floattan(30.0, degrees));
// Output: 1
return 1;
}
Notes
warning
GTA/SA-MP use degrees for angles in most circumstances, for example GetPlayerFacingAngle. Therefore, it is most likely you'll want to use the 'degrees' angle mode, not radians. Also note that angles in GTA are counterclockwise; 270° is East and 90° is West. South is still 180° and North still 0°/360°.
Related Functions
Related Resources
- Angle Modes: SI unit constants for measuring angles.