Skip to content

Math.isGreatEqual()

Description

Returns true if the value of arg₁ is greater than or equal to the value of arg₂, taking into account floating-point precision.

Syntax

JS
Math.isGreatEqual(arg1: Number, arg2: Number, eps: Number = Math.EPSILON) -> Boolean

Parameters

Parameter Type Default Value Required Description
arg1 Number ✅ First numeric value.
arg2 Number ✅ Second numeric value.
eps Number Math.EPSILON Floating-point precision tolerance.

Return value

Type Description
Boolean Result of the operation.

Example

JS
let ret = Math.isGreatEqual(5.0000001, 5.0, 1e-6);
console.info(ret); // output: true
Last update: 14 August 2025, 18:47