Make improvements
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
* @return (𝑥 mod 𝑦) ∈ [0.,𝑦)
|
||||
* @see fmod()
|
||||
*/
|
||||
static double emod(double x, double y) {
|
||||
static inline double emod(double x, double y) {
|
||||
return x - fabs(y) * floor(x / fabs(y));
|
||||
}
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
* @return (𝑥 mod 𝑦) ∈ [0.,𝑦)
|
||||
* @see fmodl()
|
||||
*/
|
||||
static long double emodl(long double x, long double y) {
|
||||
static inline long double emodl(long double x, long double y) {
|
||||
return x - fabsl(y) * floorl(x / fabsl(y));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user