Skip to main content
Module

x/denops_std/function/mod.ts>fmod

📚 Standard module for denops.vim
Go to Latest
function fmod
import { fmod } from "https://deno.land/x/denops_std@v4.1.4/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) {only available when compiled with |+float| feature}

Parameters

denops: Denops
expr1: unknown
expr2: unknown

Returns

Promise<unknown>