#include <math.h>
Go to the source code of this file.
Defines | |
#define | _Long(x) ((INT32)(x)) |
#define | _Int(x) ((INT32)(x)) |
#define | _Float(x) ((FLOAT)(x)) |
#define | _Dble(x) ((double)(x)) |
Functions | |
INT32 | LClamp (INT32 x, INT32 min, INT32 max) |
INT32 | LAbs (INT32 x) |
INT32 | LSign (INT32 x) |
INT32 | LSmooth (INT32 x) |
INT32 | LMin (INT32 x, INT32 y) |
INT32 | LMax (INT32 x, INT32 y) |
INT32 | LMin (INT32 x, INT32 y, INT32 z) |
INT32 | LMax (INT32 x, INT32 y, INT32 z) |
float | FClamp (float x) |
float | FAbs (float x) |
float | FFrac (float x) |
float | FCeil (float x) |
float | FFloor (float x) |
float | FRound (float x) |
float | FSign (float x) |
float | FSmooth (float x) |
float | FTrunc (float x) |
float | FMin (float x, float y) |
float | FMax (float x, float y) |
float | FMax (float x, float y, float z) |
float | FMin (float x, float y, float z) |
double | DAbs (double f) |
double | DFrac (double f) |
double | DCeil (double f) |
double | DCube (double f) |
double | DDegrees (double f) |
double | DFloor (double f) |
double | DInv (double f) |
BOOL | DIsZero (double f) |
double | DRadians (double f) |
double | DRound (double f) |
double | DSign (double f) |
double | DSmooth (double f) |
double | DTrunc (double f) |
double | DZSign (double f) |
double | DCubeRoot (double x) |
BOOL | DFuzEQ (double f, double g) |
BOOL | DFuzGEQ (double f, double g) |
BOOL | DFuzLEQ (double f, double g) |
double | DMax (double f, double g) |
double | DMin (double f, double g) |
void | DSwap (double &f, double &g) |
void | DSwap (INT32 &i, INT32 &j) |
void | DSort (double &lo, double &hi) |
double | DStep (double a, double f) |
double | DFuzStep (double a, double f, double fzz) |
double | DGamma (double gamma, double f) |
double | DBias (double bias, double f) |
double | DGain (double gain, double f) |
double | DExculsiveOr (double a, double b) |
double | DIntersection (double a, double b) |
double | DDifference (double a, double b) |
double | DRepeat (double u, double freq) |
double | DTile (double u, double freq) |
double | DClamp (const double x, const double a, const double b) |
double | DLerp (double f, double l, double h) |
double | DNorm (double f, double a, double b) |
double | DMax (double f, double g, double h) |
double | DMin (double f, double g, double h) |
double | DSlide (double f, double l, double h) |
double | DSmoothStep (double a, double b, double f) |
double | DBoxStep (double a, double b, double x) |
double | DPulse (double a, double b, double x) |
double | DFuzPulse (double a, double b, double x, double fzz) |
double | DRange (double t, double min, double max, double lo, double mid, double hi) |
Variables | |
double const | XS_2PI = 6.28318530717958623200 |
double const | XS_DEGTORAD = 0.01745329251994329547 |
double const | XS_E = 2.71828182845904553488 |
double const | XS_EEXPPI = 23.14069263277927390732 |
double const | XS_GOLDEN = 1.61803398874989490253 |
double const | XS_INVPI = 0.31830988618379069122 |
double const | XS_LN10 = 2.30258509299404590109 |
double const | XS_LN2 = 0.69314718055994528623 |
double const | XS_LOG10E = 0.43429448190325187218 |
double const | XS_LOG2E = 1.44269504088896338700 |
double const | XS_LOG05 = -0.693147180559945 |
double const | XS_PI = 3.14159265358979323846 |
double const | XS_PIDIV2 = 1.57079632679489655800 |
double const | XS_PIDIV4 = 0.78539816339744827900 |
double const | XS_RADTODEG = 57.29577951308232286465 |
double const | XS_SQRT2 = 1.41421356237309514547 |
double const | XS_SQRT2PI = 2.50662827463100024161 |
double const | XS_SQRT3 = 1.73205080756887719318 |
double const | XS_SQRT10 = 3.16227766016837952279 |
double const | XS_SQRTE = 1.64872127070012819416 |
double const | XS_SQRTHALF = 0.70710678118654757274 |
double const | XS_SQRTLN2 = 0.83255461115769768821 |
double const | XS_SQRTPI = 1.77245385090551588192 |
double const | XS_EPSILON = 1.0e-10 |
double const | XS_GOOGOL = 1.0e50 |
|
|
|
|
|
|
|
|
|
Definition at line 288 of file macros.h.
|
|
Definition at line 424 of file macros.h.
|
|
Definition at line 502 of file macros.h. 00503 { 00504 return (DClamp((x-a)/(b-a),0,1)); 00505 }
|
|
Definition at line 298 of file macros.h.
|
|
Definition at line 467 of file macros.h.
|
|
Definition at line 303 of file macros.h.
|
|
Definition at line 358 of file macros.h.
|
|
Definition at line 308 of file macros.h. 00309 { 00310 return f * XS_RADTODEG; 00311 }
|
|
Definition at line 444 of file macros.h.
|
|
Definition at line 434 of file macros.h.
|
|
Definition at line 313 of file macros.h.
|
|
Definition at line 293 of file macros.h. 00294 { 00295 return (f-_Long(f)); 00296 }
|
|
Definition at line 369 of file macros.h. 00370 { 00371 return (f <= g) ? (f >= g - XS_EPSILON) : (f <= g + XS_EPSILON); 00372 }
|
|
Definition at line 374 of file macros.h. 00375 { 00376 return (f >= g - XS_EPSILON); 00377 }
|
|
Definition at line 379 of file macros.h. 00380 { 00381 return (f <= g + XS_EPSILON); 00382 }
|
|
Definition at line 512 of file macros.h.
|
|
Definition at line 414 of file macros.h. 00415 { 00416 return _Dble(f>=(a+fzz)); 00417 }
|
|
Definition at line 429 of file macros.h. 00430 { 00431 return (f<0.5) ? (DBias(1.0-gain,2.0*f)/2.0) : (1-DBias(1.0-gain, 2.0-2.0*f)/2.0); 00432 }
|
|
Definition at line 419 of file macros.h. 00420 { 00421 return (gamma==0.0) ? XS_GOOGOL : pow(f, 1/gamma); 00422 }
|
|
Definition at line 439 of file macros.h.
|
|
Definition at line 318 of file macros.h.
|
|
Definition at line 323 of file macros.h. 00324 { 00325 return ((f<=0.0) ? (f >= -XS_EPSILON) : (f <= XS_EPSILON)); 00326 }
|
|
Definition at line 472 of file macros.h.
|
|
Definition at line 482 of file macros.h.
|
|
Definition at line 384 of file macros.h.
|
|
Definition at line 487 of file macros.h.
|
|
Definition at line 389 of file macros.h.
|
|
Definition at line 477 of file macros.h.
|
|
Definition at line 507 of file macros.h.
|
|
Definition at line 328 of file macros.h. 00329 { 00330 return f * XS_DEGTORAD; 00331 }
|
|
Definition at line 517 of file macros.h.
|
|
Definition at line 449 of file macros.h. 00450 { 00451 // return distance into tile 00452 return DFrac(u*freq); 00453 }
|
|
Definition at line 333 of file macros.h.
|
|
Definition at line 338 of file macros.h.
|
|
Definition at line 492 of file macros.h.
|
|
Definition at line 343 of file macros.h.
|
|
Definition at line 497 of file macros.h.
|
|
Definition at line 404 of file macros.h. 00405 { 00406 if (lo>hi) DSwap(lo,hi); 00407 }
|
|
Definition at line 409 of file macros.h. 00410 { 00411 return _Dble(f>=a); 00412 }
|
|
Definition at line 399 of file macros.h. 00400 { 00401 INT32 gmTmp = i; i = j; j = gmTmp; 00402 }
|
|
Definition at line 394 of file macros.h.
|
|
Definition at line 455 of file macros.h. 00456 { 00457 // return the tile number 00458 return _Long(u*freq); 00459 }
|
|
Definition at line 348 of file macros.h.
|
|
Definition at line 353 of file macros.h.
|
|
Definition at line 207 of file macros.h.
|
|
Definition at line 217 of file macros.h. 00218 { 00219 return (x == _Int(x)) ? x : (x > 0.0f) ? _Float(_Int(x) + 1.0f) : _Float(_Int(x)); 00220 }
|
|
Definition at line 202 of file macros.h.
|
|
Definition at line 222 of file macros.h. 00223 { 00224 return (x == _Int(x)) ? x : (x > 0.0f) ? _Float(_Int(x)) : _Float(_Int(x) - 1.0f); 00225 }
|
|
Definition at line 212 of file macros.h. 00213 { 00214 return (x-((INT32)(x))); 00215 }
|
|
Definition at line 267 of file macros.h.
|
|
Definition at line 257 of file macros.h.
|
|
Definition at line 272 of file macros.h.
|
|
Definition at line 252 of file macros.h.
|
|
Definition at line 227 of file macros.h.
|
|
Definition at line 232 of file macros.h.
|
|
Definition at line 237 of file macros.h.
|
|
Definition at line 242 of file macros.h.
|
|
Definition at line 151 of file macros.h.
|
|
Definition at line 146 of file macros.h.
|
|
Definition at line 191 of file macros.h.
|
|
Definition at line 176 of file macros.h.
|
|
Definition at line 186 of file macros.h.
|
|
Definition at line 171 of file macros.h.
|
|
Definition at line 156 of file macros.h.
|
|
Definition at line 161 of file macros.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|