#include "nvsgcommon.h"
#include <algorithm>
#include <float.h>
#include "__WIN64__workarounds.h"
Include dependency graph for nvmath.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | nvmath |
Functions | |
template<class T> | |
T | clamp (T v, T l, T u) |
Template to clamp an object of type T to a lower and an upper limit. | |
float | degToRad (float angle) |
Transform an angle in degrees to radians. | |
bool | isPowerOfTwo (int n) |
Determine if an integer is a power of two. | |
template<typename T> | |
T | lerp (float alpha, const T &v0, const T &v1) |
Linear interpolation between two values v0 and v1. | |
int | powerOfTwoBelow (int n) |
Determine the largest integer power of two below an integer. | |
float | radToDeg (float angle) |
Transform an angle in radian to degree. | |
template<typename T> | |
int | sign (const T &t) |
Determine the sign of a scalar. | |
template<typename T> | |
float | square (const T &t) |
Template to square an object of Type T. | |
Variables | |
const float | PI = 3.14159265358979323846f |
constant PI | |
const float | PI_HALF = 1.57079632679489661923f |
constant PI half | |
const float | PI_QUARTER = 0.78539816339744830962f |
constant PI quarter | |
const float | SQRT_TWO = 1.41421356237309504880f |
constant square root two | |
const float | SQRT_TWO_HALF = 0.70710678118654752440f |
constant square root two half |
|
Template to clamp an object of type T to a lower and an upper limit.
|
|
Transform an angle in degrees to radians.
|
|
Determine if an integer is a power of two.
|
|
Linear interpolation between two values v0 and v1. v = v0 + alpha * ( v1 - v0 )
|
|
Determine the largest integer power of two below an integer.
|
|
Transform an angle in radian to degree.
|
|
Determine the sign of a scalar.
|
|
Template to square an object of Type T.
|
|
constant PI
|
|
constant PI half
|
|
constant PI quarter
|
|
constant square root two
|
|
constant square root two half
|