Mercurial > hg > svcore
comparison base/System.cpp @ 127:514ebb0c5c6c
* add mod/modf and princarg/princargf to system header (for now)
author | Chris Cannam |
---|---|
date | Mon, 26 Jun 2006 16:08:01 +0000 |
parents | ac89a106f155 |
children |
comparison
equal
deleted
inserted
replaced
126:68ff162fdbc3 | 127:514ebb0c5c6c |
---|---|
68 return UnknownProcessStatus; | 68 return UnknownProcessStatus; |
69 } | 69 } |
70 #endif | 70 #endif |
71 } | 71 } |
72 | 72 |
73 double mod(double x, double y) { return x - (y * floor(x / y)); } | |
74 float modf(float x, float y) { return x - (y * floorf(x / y)); } | |
75 | |
76 double princarg(double a) { return mod(a + M_PI, -2 * M_PI) + M_PI; } | |
77 float princargf(float a) { return modf(a + M_PI, -2 * M_PI) + M_PI; } | |
78 |