Check if the value is an integer number.

Synopsis

Declared in <mrdocs/Support/JavaScript.hpp>

bool
isInteger() const noexcept;

Description

All numbers are internally represented by IEEE doubles, which are capable of representing all integers up to 53 bits accurately.

This function returns true if the value is a number with no precision loss when representing an integer.

When isNumber() is true, the function behaves as if evaluating the condition d == static_cast<double>(static_cast<int>(d)) where d is the result of toDouble().

Return Value

true if the value is a number with no fractional part, false otherwise

Created with MrDocs