-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
MinorThis change is a minor additionThis change is a minor additionQualityThis change improves the code's qualityThis change improves the code's quality
Description
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 additionThis change is a minor additionQualityThis change improves the code's qualityThis change improves the code's quality