Level H Engine
Functions
Mechanics Namespace Reference

Contains physics mechanics functions for use within the code. More...

Functions

float distanceBetweenTwoPoints (Vec3 point1Pos, Vec3 point2Pos)
 Takes in two positions and works out the distance between them. More...
 
float distanceBetweenTwoPoints (Vec2 point1Pos, Vec2 point2Pos)
 Takes in two positions and works out the distance between them. More...
 
float calculateVelocity (float distance, float time)
 Calculates velocity from the distance and time. More...
 

Detailed Description

Contains physics mechanics functions for use within the code.

Function Documentation

◆ calculateVelocity()

float Mechanics::calculateVelocity ( float  distance,
float  time 
)

Calculates velocity from the distance and time.

Parameters
distanceThe distance.
timeThe time.
Returns
The calculated velocity.

◆ distanceBetweenTwoPoints() [1/2]

float Mechanics::distanceBetweenTwoPoints ( Vec3  point1Pos,
Vec3  point2Pos 
)

Takes in two positions and works out the distance between them.

Parameters
point1PosOne of the positions.
point2PosOne of the position.
Returns
The distance between two points.
Here is the caller graph for this function:

◆ distanceBetweenTwoPoints() [2/2]

float Mechanics::distanceBetweenTwoPoints ( Vec2  point1Pos,
Vec2  point2Pos 
)

Takes in two positions and works out the distance between them.

Parameters
point1PosOne of the positions.
point2PosOne of the position.
Returns
The distance between two points.