Sybren A. Stüvel
88f536dc02
Add always-positive modulo function
...
Add modulo function `mod_f_positive(f, n)` that returns a positive result,
regardless of the sign of `f`.
For example, `mod_f_positive(-0.1, 1.0)` returns `0.9`, whereas the
standard `fmodf()` function would return `-0.1`.
This is useful for rewrapping values to a specific interval.
2023-05-16 11:41:17 +02:00
..
2023-05-16 13:15:48 +10:00
2023-03-30 10:51:59 +02:00
2023-05-03 17:23:19 +10:00
2023-05-16 14:41:21 +10:00
2023-05-16 11:41:17 +02:00
2023-05-16 13:15:48 +10:00
2023-04-12 15:09:21 +02:00
2023-05-09 12:54:55 -04:00
2023-05-15 15:14:22 +02:00
2023-05-03 17:13:42 +10:00
2023-05-15 15:14:22 +02:00
2023-05-15 15:14:22 +02:00
2023-05-16 10:46:10 +02:00
2023-05-15 15:14:22 +02:00
2023-05-10 12:06:27 +10:00
2023-05-16 17:19:31 +12:00
2023-05-13 17:38:48 +10:00
2023-05-15 15:14:22 +02:00
2023-05-15 10:46:26 +02:00
2023-05-16 13:15:48 +10:00
2023-05-16 13:15:48 +10:00
2023-05-15 10:46:26 +02:00
2023-05-15 15:14:22 +02:00
2023-05-10 16:01:38 +02:00
2023-05-16 10:15:56 +12:00
2023-05-14 15:23:43 +02:00
2023-05-15 15:14:22 +02:00
2023-05-13 17:38:46 +10:00
2023-05-09 14:08:19 +10:00
2023-05-02 10:42:24 +10:00
2023-05-16 13:15:48 +10:00
2023-05-08 23:48:38 +02:00