Skip to content
This repository was archived by the owner on Nov 29, 2026. It is now read-only.
This repository was archived by the owner on Nov 29, 2026. It is now read-only.

Integral Type Methods. #27

Open

Description

@shishioko

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)

Activity

  1. Zffu commented on Feb 24, 2026

    @Zffu
    Member

    This will be added at a later update with the support for extending generic type functions

  2. self-assigned this
    on Feb 24, 2026
  3. added theissue type on Feb 24, 2026
  4. moved this to Todo this release in Quickfallon Mar 3, 2026
  5. moved this from Todo this release to Todo Later in Quickfallon May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

  • Status
    Todo Later

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions