Skip to content

dos_modf

Dale Fugier edited this page Nov 8, 2023 · 2 revisions

Splits a floating-point value into integer and fractional parts.

Syntax

(dos_modf number)

Parameters

number

The number.

Returns

A list containing the integer and fractional parts, if successful.

nil on error.

Example

Command: (dos_modf (dos_e))
(2.0 0.718282)

Command: (dos_modf (dos_pi))
(3.0 0.141593)

Command: (dos_modf -14.87654321)
(-14.0 -0.876543)
Clone this wiki locally