Back
floor-mod (clj)
(source)function
(floor-mod x y)
Integer modulus x - (floorDiv(x, y) * y). Sign matches y and is in the
range -|y| < r < |y|.
See: https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#floorMod-long-long-
Examples
clojure
(ns clojure.test-clojure.math
(:require
[clojure.test :refer :all]
[clojure.math :as m]))
(deftest test-floor-mod
(is (= 3 (m/floor-mod -2 5))))