CrImage::Math::Fixed::Int52_12
Inherits Struct / Value / Object
Int52_12 is a signed 52.12 fixed-point number. The Integer part ranges from -2251799813685248 to 2251799813685247. The fractional part has 12 bits of precision.
For example, the number one-and-a-quarter is Int26_6[1<<12 + 1<<10].
Class methods
[](value : Number)
SourceInstance methods
*(y : Int52_12)
Source*(y : Number)
Source+(y : Int52_12)
Source-(y : Int52_12)
Source<(y : Int52_12)
Source<=(y : Int52_12)
Source==(y : Int52_12)
Source==(y : Number)
Source>(y : Int52_12)
Source>=(y : Int52_12)
Sourceceil
ceil returns the least integer value less than or equal to @val.
Its return is Int64, not Int52_12
floor
floor returns the greatest integer value less than or equal to @val.
Its return is Int64, not Int52_12
round
round returns the nearest integer value to @val. Ties are rounded up.
Its return is Int64, not Int52_12
to_i
Sourceto_s
returns human-readable representation of 52.12 fixed-point number. For example, the number one-and-a-quarter becomes "1:1024".
Macros
method_missing(call)
Source