Skip to content

floor

Return number rounded down to precision.

Usage

ts
import { floor } from 'rattail'

floor(1.005) // return 1
floor(1.0015, 3) // return 1.001

Arguments

ArgTypeDefaults
valnumber
precisionnumber0

Return

Type
number