Skip to content
On this page

AthenaClient.utility.math

Functions

degToRad

Usage

AthenaClient.utility.math.degToRad(degrees): number

Converts degrees to radians

Name

degToRad

Parameters

NameType
degreesnumber

Returns

number

s

Defined in

client/utility/math.ts:43


getAverage

Usage

AthenaClient.utility.math.getAverage(data): number

Returns the average value among all numbers.

Parameters

NameType
datanumber[]

Returns

number

Defined in

client/utility/math.ts:113


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

NameType
v1Vector3
v2Vector3

Returns

alt.Vector3

s

Defined in

client/utility/math.ts:14


getDirectionFromRotation

Usage

AthenaClient.utility.math.getDirectionFromRotation(rotation): alt.IVector3

It's converting a rotation to a direction.

Name

getDirectionFromRotation

Parameters

NameType
rotationIVector3

Returns

alt.IVector3

s

Defined in

client/utility/math.ts:72


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

NameType
vectorVector3

Returns

alt.Vector3

s

Defined in

client/utility/math.ts:28


getPointsInCircle

Usage

AthenaClient.utility.math.getPointsInCircle(points, radius, center): alt.IVector2[]

Returns an array of alt.IVector2 in a circle

Name

getPointsInCircle

Parameters

NameType
pointsnumber
radiusnumber
centerIVector2

Returns

alt.IVector2[]

s

Defined in

client/utility/math.ts:92


rotationToDirection

Usage

AthenaClient.utility.math.rotationToDirection(rotation): alt.Vector3

Could also be seen as rotAnglesToVector

Parameters

NameType
rotationIVector3

Returns

alt.Vector3

Defined in

client/utility/math.ts:54

Created by Stuyk | Est. 2020