diff options
Diffstat (limited to 'raul/Quantizer.h')
-rw-r--r-- | raul/Quantizer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/raul/Quantizer.h b/raul/Quantizer.h index c6a9bfb..350e2e2 100644 --- a/raul/Quantizer.h +++ b/raul/Quantizer.h @@ -26,7 +26,7 @@ namespace Raul { class Quantizer { public: inline static double quantize(double q, double value) { - return lrint(value / q) * q; + return (q > 0) ? lrint(value / q) * q : value; } }; |