Skip to content

Math.isEqual()

Description

Returns true, if the absolute difference between arg₁ and arg₂ is less than or equal to eps.

Syntax

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

Parameters

Parameter Type Default Value Mandatory Description
arg1 Number ✅ First numeric value.
arg2 Number ✅ Second numeric value.
eps Number Math.EPSILON Precision of floating-point number comparison.

Return value

Type Description
Boolean Result of the operation.

Example

JS
let ret = Math.isEqual(1 / 3, 1);
console.info(ret);
Last update: 14 August 2025, 18:47