import { fmod } from "https://deno.land/x/denops_std@v6.1.0/function/mod.ts";
Return the remainder of {expr1} / {expr2}, even if the
division is not representable. Returns {expr1} - i * {expr2}
for some integer i such that if {expr2} is non-zero, the
result has the same sign as {expr1} and magnitude less than
the magnitude of {expr2}. If {expr2} is zero, the value
returned is zero. The value returned is a Float
.
{expr1} and {expr2} must evaluate to a Float
or a Number
.
Returns 0.0 if {expr1} or {expr2} is not a Float
or a
Number
.
Examples:
:echo fmod(12.33, 1.22)
0.13
:echo fmod(-12.33, 1.22)
-0.13
Can also be used as a method
:
Compute()->fmod(1.22)