import { fn } from "https://deno.land/x/ddc_vim@v4.1.0/deps.ts";
const { sqrt } = fn;
Return the non-negative square root of Float {expr} as a
Float
.
{expr} must evaluate to a Float
or a Number
. When {expr}
is negative the result is NaN (Not a Number). Returns 0.0 if
{expr} is not a Float
or a Number
.
Examples:
:echo sqrt(100)
10.0
:echo sqrt(-4.01)
nan
"nan" may be different, it depends on system libraries.
Can also be used as a method
:
Compute()->sqrt()
Parameters
denops: Denops