Level H Engine
Functions
Convert Namespace Reference

Contains maths conversion functions for use within the code. More...

Functions

float normaliseFloat (float numToNormalise, float maxNum, float minNum)
 Normailises a float. More...
 
float convertDegreeToRadian (float angle)
 Converts the degree to a radian. More...
 
float convertRadianToDegree (float angle)
 Converts the radian to a degree. More...
 
Vec2 convertToOpenGLCoords (Vec2 inVec)
 Converts the coordinates to work with OpenGL. More...
 
Vec2 scaleToOpenGLCoords (Vec2 inVec)
 Scales the coordinates to work with OpenGL. More...
 
Vec3 scaleToOpenGLCoords (Vec3 inVec)
 Scales the coordinates to work with OpenGL. More...
 

Detailed Description

Contains maths conversion functions for use within the code.

Function Documentation

◆ convertDegreeToRadian()

float Convert::convertDegreeToRadian ( float  angle)

Converts the degree to a radian.

Parameters
angleThe angle to convert.
Returns
The converted radian.
Here is the caller graph for this function:

◆ convertRadianToDegree()

float Convert::convertRadianToDegree ( float  angle)

Converts the radian to a degree.

Parameters
angleThe angle to convert.
Returns
The converted degree.

◆ convertToOpenGLCoords()

Vec2 Convert::convertToOpenGLCoords ( Vec2  inVec)

Converts the coordinates to work with OpenGL.

Parameters
inVecThe coordinates to convert.
Returns
The converted coordinates.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ normaliseFloat()

float Convert::normaliseFloat ( float  numToNormalise,
float  maxNum,
float  minNum 
)

Normailises a float.

Parameters
numToNormaliseThe number to normalise.
maxNumThe maximum value.
minNumThe minimum value.
Returns
The normailised float.
Here is the caller graph for this function:

◆ scaleToOpenGLCoords() [1/2]

Vec2 Convert::scaleToOpenGLCoords ( Vec2  inVec)

Scales the coordinates to work with OpenGL.

Parameters
inVecThe coordinates to scale.
Returns
The scaled coordinates.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scaleToOpenGLCoords() [2/2]

Vec3 Convert::scaleToOpenGLCoords ( Vec3  inVec)

Scales the coordinates to work with OpenGL.

Parameters
inVecThe coordinates to scale.
Returns
The scaled coordinates.
Here is the call graph for this function: