Skip to content
x768 edited this page Sep 21, 2017 · 2 revisions

Description

Base of Number type. Such as Int, Float and Frac.

Inherits

lang.Object

Ability

Constructors

Methods and Properties

to_int():Int

Converts to integer by rounding toward to 0.

to_float():Float

Converts to Float (64bit floating point)

to_frac():Frac

Converts to Frac. (Rational number)

puts 2.5.to_int()  // 2
puts 1.to_float()  // 1.0
Clone this wiki locally