floor(x: number,n?: number,): number
Rounds toward negative infinity.
Rounds the input value(s) towards negative infinity, optionally to a specified number of decimal places.
Round PI to 12 decimal places
Round PI to 12 decimal places
import { assertEquals } from "jsr:@std/assert"; assertEquals(floor(Math.PI, 12), 3.141592653589);
Round a single number toward negative infinity
Round a single number toward negative infinity
import { assertEquals } from "jsr:@std/assert"; assertEquals(floor(3.78), 3);
floor(x: array,n?: number,): array
Rounds toward negative infinity.
Rounds the input value(s) towards negative infinity, optionally to a specified number of decimal places.
Round PI to 12 decimal places
Round PI to 12 decimal places
import { assertEquals } from "jsr:@std/assert"; assertEquals(floor(Math.PI, 12), 3.141592653589);
Round a single number toward negative infinity
Round a single number toward negative infinity
import { assertEquals } from "jsr:@std/assert"; assertEquals(floor(3.78), 3);
x: array
Value(s) to be rounded
The rounded value(s)
floor(x: matrix,n?: number,): matrix
Rounds toward negative infinity.
Rounds the input value(s) towards negative infinity, optionally to a specified number of decimal places.
Round PI to 12 decimal places
Round PI to 12 decimal places
import { assertEquals } from "jsr:@std/assert"; assertEquals(floor(Math.PI, 12), 3.141592653589);
Round a single number toward negative infinity
Round a single number toward negative infinity
import { assertEquals } from "jsr:@std/assert"; assertEquals(floor(3.78), 3);
x: matrix
Value(s) to be rounded
The rounded value(s)