Import std.math.fixed
Fixed64
struct
Public Struct Fixed64 Implements Numeric, Comparable, Hashable, Bounded, Printable, Defaultable
A number with 32 bits for its whole part, its sign among them, and 32 after the point: from -2147483648 to 2147483647.9999999998, in steps of 1 / 4294967296.
-
The Fixed64 these
bitsare, as Raw gives them. -
The whole number. One outside an Int's range panics.
-
The Double, rounded to the nearest Fixed64, halves away from 0. One outside a Fixed64's range, or NaN, panics.
-
The Float, rounded to the nearest Fixed64. One outside a Fixed64's range, or NaN, panics.
-
The zero Fixed64, which adding leaves alone.
-
The Fixed64 1, raw 4294967296, which multiplying leaves alone.
-
The zero Fixed64.
-
The lowest Fixed64, -2147483648.
-
The highest Fixed64, about 2147483647.9999999998.
-
The
valueas the nearest Double, which holds its 53 most significant bits. -
Pi, and a turn, 2 Pi, rounded to a Fixed64's steps.
-
A turn, 2 Pi, rounded to a Fixed64's steps.
-
The value's bits, the value times 4294967296.
-
The value as a Double, rounded to the nearest, which holds it exactly up to 2^21.
-
The value as a Float, rounded to the nearest: once, from the bits, since a Double of them can round already.
-
The whole part, toward 0, as As takes a Float's.
-
The value as a Fixed32, rounded to the nearest, halves up. One outside a Fixed32's range overflows, as Narrowed says.
-
The value in decimal, from its bits: its whole part, and the fewest digits after the point that are nearer it than any other Fixed64, so no two print alike and none prints past what it holds.
-
aplusb. Panics in a debug build when it's past what a Fixed64 holds, and wraps in a release one. -
aminusb. Panics in a debug build when it's past what a Fixed64 holds, and wraps in a release one. -
anegated. -
Whether
ais less thanb. -
atimesb. Panics in a debug build when it's past what a Fixed64 holds, and wraps in a release one. Rounded to the nearest. -
atimesb. -
atimesb. -
adivided byb. Abof 0 panics, and a quotient past what it holds does as + does. -
adivided byb.
Report an issue with this page or with FutureBlitz on GitHub.