Go to the source code of this file.
Functions |
| double | Norm2D (double x, double y) |
| double | Norm3D (double x, double y, double z) |
| double | Clamp (double v, double min, double max) |
| double | Window (double v, double fixed, double delta) |
Detailed Description
Function Documentation
| double Clamp |
( |
double |
v, |
|
|
double |
min, |
|
|
double |
max |
|
) |
| |
Function to clamp a value to minimum and maximum values.
- Parameters:
-
| v | The value to clamp. |
| min | The minimum value that v can go to. |
| max | The maximum value that v can go to. |
| double Norm2D |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
Calculates the normal value of a 2D vector. The algorithm is
.
- Parameters:
-
| x | The x coordinate. |
| y | The y coordinate. |
| double Norm3D |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Calculate the normal value of a 3D vector. The algorithm used is
.
- Parameters:
-
| x | The x coordinate. |
| y | The y coordinate. |
| z | The z coordinate. |
| double Window |
( |
double |
v, |
|
|
double |
fixed, |
|
|
double |
delta |
|
) |
| |
Function to set a window on a value to keep it at a fixed value within the window's delta.
- Parameters:
-
| v | The value to keep within the window. |
| fixed | The value fix to if the value is within the window's delta. |
| delta | The delta to keep the value to the fixed value. |