Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/mod.ts>sqrt

๐Ÿ“š Standard module for denops.vim
Go to Latest
function sqrt
import { sqrt } from "https://deno.land/x/denops_std@v5.0.2/function/mod.ts";

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
expr: unknown

Returns

Promise<number>