You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nyan needs a built-in fixed-point type to handle safe arithmetics for fractional numbers. The implementation can be taken from the openage fixed-point implementation.
The type identifier could be fixed, fpdouble or doublefp. It can probably be hardcoded as a <int64_t, 16> fixed point (64 Bit signed, 16 Bit scale factor) which should be sufficient for most use cases.
ExampleObj():
member : fixed = 1.25
The type could be compatible with the int type, and maybe with float if float is the left operand.
fixed o fixed => fixed
fixed o int => fixed
fixed o float => ERROR
The text was updated successfully, but these errors were encountered:
nyan needs a built-in fixed-point type to handle safe arithmetics for fractional numbers. The implementation can be taken from the openage fixed-point implementation.
The type identifier could be
fixed
,fpdouble
ordoublefp
. It can probably be hardcoded as a<int64_t, 16>
fixed point (64 Bit signed, 16 Bit scale factor) which should be sufficient for most use cases.The type could be compatible with the
int
type, and maybe withfloat
iffloat
is the left operand.fixed
ofixed
=>fixed
fixed
oint
=>fixed
fixed
ofloat
=> ERRORThe text was updated successfully, but these errors were encountered: