Makefiles chain, dependancies and libsndfile configure checked.
[Faustine.git] / interpretor / aux.ml
index a33e722..7c21a61 100644 (file)
@@ -27,3 +27,10 @@ let rint : float -> float =
   fun f -> 
     if (f -. (floor f)) >= 0.5 then ceil f
     else floor f;;
+
+let remainder_float : float -> float -> float = 
+  fun f1 -> fun f2 ->
+    let r = mod_float f1 f2 in
+    if (abs_float r) > ((abs_float f2) /. 2.) then
+      (if r *. f2 > 0. then (r -. f2) else (r +. f2))
+    else r;;