#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <limits.h>
Go to the source code of this file.
Defines | |
#define | WIN32_LEAN_AND_MEAN |
#define | INV_PI 0.31830988618379067154f |
#define | INV_TWOPI 0.15915494309189533577f |
#define | INV_FOURPI 0.079577471545947673f |
#define | RAY_EPSILON 1e-4f |
#define | EPSILON 1e-5f |
#define | INFINITY FLT_MAX |
#define | FOR(__i, __times) for(int __i=0;__i<__times;__i++) |
#define | FOR2(__i, __from, __to) for(int __i=__from;__i<=__to;__i++) |
#define | FOR3(__i, __from, __to) for(int __i=__from;__i<__to;__i++) |
Functions | |
float | lerp (float t, float v1, float v2) |
float | clamp (float val, float low, float high) |
int | clamp (int val, int low, int high) |
int | mod (int a, int b) |
float | radians (float deg) |
float | degrees (float rad) |
float | randf () |
float | random (float lower=0.0, float upper=1.0, int granularity=RAND_MAX-1) |
int | ceilpow2 (int x) |
int | divceil (int dividend, int divisor) |
#define EPSILON 1e-5f |
#define FOR | ( | __i, | |||
__times | ) | for(int __i=0;__i<__times;__i++) |
#define FOR2 | ( | __i, | |||
__from, | |||||
__to | ) | for(int __i=__from;__i<=__to;__i++) |
#define FOR3 | ( | __i, | |||
__from, | |||||
__to | ) | for(int __i=__from;__i<__to;__i++) |
#define INFINITY FLT_MAX |
#define INV_FOURPI 0.079577471545947673f |
#define INV_PI 0.31830988618379067154f |
#define INV_TWOPI 0.15915494309189533577f |
#define RAY_EPSILON 1e-4f |
#define WIN32_LEAN_AND_MEAN |
int ceilpow2 | ( | int | x | ) | [inline] |
int clamp | ( | int | val, | |
int | low, | |||
int | high | |||
) | [inline] |
float clamp | ( | float | val, | |
float | low, | |||
float | high | |||
) | [inline] |
float degrees | ( | float | rad | ) | [inline] |
int divceil | ( | int | dividend, | |
int | divisor | |||
) | [inline] |
float lerp | ( | float | t, | |
float | v1, | |||
float | v2 | |||
) | [inline] |
int mod | ( | int | a, | |
int | b | |||
) | [inline] |
float radians | ( | float | deg | ) | [inline] |
float randf | ( | ) | [inline] |
float random | ( | float | lower = 0.0 , |
|
float | upper = 1.0 , |
|||
int | granularity = RAND_MAX-1 | |||
) | [inline] |