-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The Suggestion is to allow some built, as well as extended ones, if this will be a language feature, Methods/Functions to be used directly on inline integer values.
This could be used to reduce code size overhead, at no additional cost.
The following is an example of the possible usage.
u64 networkSize = 256.InvertEndianness();
Alongside this, some commonly useful methods should be implemented, such as:
- reversing the endianness
- converting data to a specific endianness (changing the endianness to another, unless the target endianness is the system endianness)
- calculating the ceiling (rounded up) number of a floating point number
- calculating the floor (rounded down) number of a floating point number
- calculating a commonly rounded floating point number (2.4 -> 2.0, 2.5 -> 2.0 2.6 -> 3.0)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels