mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
Make some variables in math utilities const.
This commit is contained in:
parent
ae4c906679
commit
ca150c49ee
@ -861,14 +861,14 @@ inline void sin_cos_degrees(T const& x,
|
|||||||
// the argument to the range [-45, 45] before converting it to radians.
|
// the argument to the range [-45, 45] before converting it to radians.
|
||||||
|
|
||||||
T remainder = math::mod(x, T(360));
|
T remainder = math::mod(x, T(360));
|
||||||
T quotient = std::floor(remainder / T(90) + T(0.5));
|
T const quotient = std::floor(remainder / T(90) + T(0.5));
|
||||||
remainder -= T(90) * quotient;
|
remainder -= T(90) * quotient;
|
||||||
|
|
||||||
// Convert to radians.
|
// Convert to radians.
|
||||||
remainder *= d2r<T>();
|
remainder *= d2r<T>();
|
||||||
|
|
||||||
T s = sin(remainder);
|
T const s = sin(remainder);
|
||||||
T c = cos(remainder);
|
T const c = cos(remainder);
|
||||||
|
|
||||||
switch (unsigned(quotient) & 3U)
|
switch (unsigned(quotient) & 3U)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user