AthenaClient.utility.math ​
Functions ​
degToRad ​
Usage
AthenaClient.utility.math.degToRad(degrees): number
Converts degrees to radians
Name
degToRad
Parameters ​
| Name | Type | 
|---|---|
| degrees | number | 
Returns ​
number
s
Defined in ​
getAverage ​
Usage
AthenaClient.utility.math.getAverage(data): number
Returns the average value among all numbers.
Parameters ​
| Name | Type | 
|---|---|
| data | number[] | 
Returns ​
number
Defined in ​
getCrossProduct ​
Usage
AthenaClient.utility.math.getCrossProduct(v1, v2): alt.Vector3
It's a function that takes two vectors and returns a vector.
Name
getCrossProduct
Parameters ​
| Name | Type | 
|---|---|
| v1 | Vector3 | 
| v2 | Vector3 | 
Returns ​
alt.Vector3
s
Defined in ​
getDirectionFromRotation ​
Usage
AthenaClient.utility.math.getDirectionFromRotation(rotation): alt.IVector3
It's converting a rotation to a direction.
Name
getDirectionFromRotation
Parameters ​
| Name | Type | 
|---|---|
| rotation | IVector3 | 
Returns ​
alt.IVector3
s
Defined in ​
getNormalizedVector ​
Usage
AthenaClient.utility.math.getNormalizedVector(vector): alt.Vector3
It's a function that takes a vector and returns a normalized vector.
Name
getNormalizedVector
Parameters ​
| Name | Type | 
|---|---|
| vector | Vector3 | 
Returns ​
alt.Vector3
s
Defined in ​
getPointsInCircle ​
Usage
AthenaClient.utility.math.getPointsInCircle(points, radius, center): alt.IVector2[]
Returns an array of alt.IVector2 in a circle
Name
getPointsInCircle
Parameters ​
| Name | Type | 
|---|---|
| points | number | 
| radius | number | 
| center | IVector2 | 
Returns ​
alt.IVector2[]
s
Defined in ​
rotationToDirection ​
Usage
AthenaClient.utility.math.rotationToDirection(rotation): alt.Vector3
Could also be seen as rotAnglesToVector
Parameters ​
| Name | Type | 
|---|---|
| rotation | IVector3 | 
Returns ​
alt.Vector3
 V5 Docs
V5 Docs