Roboid Control for C#
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | List of all members
LinearAlgebra.Float Class Reference

Detailed Description

Float number utilities.

Static Public Member Functions

static float Clamp (float f, float min, float max)
 Clamp the value between the given minimum and maximum values.
 
static float Clamp01 (float f)
 Clamp the value between to the interval [0..1].
 

Static Public Attributes

const float epsilon = 1E-05f
 The precision of float numbers.
 
const float sqrEpsilon = 1e-10f
 The square of the float number precision.
 

Member Function Documentation

◆ Clamp()

static float LinearAlgebra.Float.Clamp ( float  f,
float  min,
float  max 
)
static

Clamp the value between the given minimum and maximum values.

Parameters
fThe value to clamp
minThe minimum value
maxThe maximum value
Returns
The clamped value

◆ Clamp01()

static float LinearAlgebra.Float.Clamp01 ( float  f)
static

Clamp the value between to the interval [0..1].

Parameters
fThe value to clamp
Returns
The clamped value