Skip to content

Consider providing constants in a separate namespace #88

@Pharap

Description

@Pharap

At the moment the named constants (such as E, Pi, Tau and Phi) are static class members of SFixed and UFixed.

From a maintenance point of view, it would be beneficial to reduce the duplication by moving this functionality into a single place, e.g. a class or namespace provided by Utils.h.

These constants could then take the form of constexpr template functions rather than static constexpr data members. The functions would essentially pass a floating point value to the appropriate constructor of each type.

The old values could be deprecated and removed in some future breaking change, but for now simply adding a separate (preferred) source of constants would be a non-breaking additional improvement.

Metadata

Metadata

Assignees

Labels

MinorThis change is a minor additionQualityThis change improves the code's quality

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions