Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/math/index.js>round

A JavaScript extension package for building strong and modern applications.
Latest
function round
import { round } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/math/index.js";

Returns the rounded value of the given number.

Examples

Example 1

import { round } from "@ayonli/jsext/math";

console.log(round(1.2345)); // 1
console.log(round(1.2345, 2)); // 1.23
console.log(round(1.2345, 3)); // 1.235

Parameters

value
optional
precision = [UNSUPPORTED]