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
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.
The text was updated successfully, but these errors were encountered:
At the moment the named constants (such as
E
,Pi
,Tau
andPhi
) arestatic
class members ofSFixed
andUFixed
.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 thanstatic 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.
The text was updated successfully, but these errors were encountered: