Moscrif API Docs for: 2012q3
Show:

Integer Class

Library: core

All integers are represented by this class.

Item Index

Properties

Methods

isFinite

() Boolean

Returns true if this value is a finite number.

Returns:

isNaN

() Boolean

Returns true if this value appears to be not a number.

Returns:

limit

(
  • min
  • max
)
Integer

Method - returns clipped value of this integer.

Parameters:

Returns:

Example:

function Integer.limit(min, max)
{
    if (this < min)
        return min;
    if (this > max)
        return max;
    return this;
}

max

(
  • values
)
Integer

Find maximum value of its arguments.

Parameters:

  • values Integer multiple

    Integer values to compare

Returns:

Example:

Integer.max(1, 2, 3); // returns 3

min

(
  • values
)
Integer

Find minimum value of arguments.

Parameters:

  • values Integer multiple

    Integer values to compare

Returns:

Example:

    Integer.min(1, 2, 3); // returns 1

toFloat

() Float

Converts this integer value to float.

Returns:

Float: Value converted to float.

toString

(
  • [radix]
)
String

Returns string representation of the integer using one of radix value: 10 (default), 8 or 16.

Parameters:

  • [radix] Integer optional

    Radix, the default is 10.

Returns:

String: String representation of the integer

Properties

MAX

Integer

Maximum signed integer value. (2147483647)

MIN

Integer

Minimal value of integer type. (-2147483648)