Store Mix factors as reciprocals and multiply

This commit is contained in:
Scott Lahteine
2016-11-12 14:33:07 -06:00
parent 06f2282f82
commit f663220e87
3 changed files with 18 additions and 17 deletions

View File

@ -133,4 +133,6 @@
#define NEAR_ZERO(x) ((x) > -0.000001 && (x) < 0.000001)
#define NEAR(x,y) NEAR_ZERO((x)-(y))
#define RECIPROCAL(x) (NEAR_ZERO(x) ? 0.0 : 1.0 / (x))
#endif //__MACROS_H