@@ -62,22 +62,22 @@ using namespace ebsdlib;
6262namespace CubicHigh
6363{
6464
65- static const std::array<size_t , 3 > OdfNumBins = {18 , 18 , 18 }; // Represents a 5Deg bin
65+ constexpr std::array<size_t , 3 > OdfNumBins = {18 , 18 , 18 }; // Represents a 5Deg bin
6666static const std::array<double , 3 > OdfDimInitValue = {std::pow ((0.75 * (ebsdlib::constants::k_PiOver4D - std::sin (ebsdlib::constants::k_PiOver4D))), (1.0 / 3.0 )),
6767 std::pow ((0.75 * (ebsdlib::constants::k_PiOver4D - std::sin (ebsdlib::constants::k_PiOver4D))), (1.0 / 3.0 )),
6868 std::pow ((0.75 * (ebsdlib::constants::k_PiOver4D - std::sin (ebsdlib::constants::k_PiOver4D))), (1.0 / 3.0 ))};
6969
7070static const std::array<double , 3 > OdfDimStepValue = {OdfDimInitValue[0 ] / static_cast <double >(OdfNumBins[0 ] / 2 ), OdfDimInitValue[1 ] / static_cast <double >(OdfNumBins[1 ] / 2 ),
7171 OdfDimInitValue[2 ] / static_cast <double >(OdfNumBins[2 ] / 2 )};
7272
73- static const int symSize0 = 6 ;
74- static const int symSize1 = 12 ;
75- static const int symSize2 = 8 ;
73+ constexpr int symSize0 = 6 ;
74+ constexpr int symSize1 = 12 ;
75+ constexpr int symSize2 = 8 ;
7676
77- static const int k_OdfSize = 5832 ;
78- static const int k_MdfSize = 5832 ;
79- static const int k_SymOpsCount = 24 ;
80- static const int k_NumMdfBins = 13 ;
77+ constexpr int k_OdfSize = 5832 ;
78+ constexpr int k_MdfSize = 5832 ;
79+ constexpr int k_SymOpsCount = 24 ;
80+ constexpr int k_NumMdfBins = 13 ;
8181
8282static const double SlipDirections[12 ][3 ] = {{0.0 , 1.0 , -1.0 }, {1.0 , 0.0 , -1.0 }, {1.0 , -1.0 , 0.0 }, {1.0 , -1.0 , 0.0 }, {1.0 , 0.0 , 1.0 }, {0.0 , 1.0 , 1.0 },
8383 {1.0 , 1.0 , 0.0 }, {0.0 , 1.0 , 1.0 }, {1.0 , 0.0 , -1.0 }, {1.0 , 1.0 , 0.0 }, {1.0 , 0.0 , 1.0 }, {0.0 , 1.0 , -1.0 }};
@@ -240,8 +240,8 @@ static const double MatSym[k_SymOpsCount][3][3] = {
240240
241241};
242242/* clang-format on */
243- static const double k_EtaMin = 0.0 ;
244- static const double k_EtaMax = 45.0 ;
243+ constexpr double k_EtaMin = 0.0 ;
244+ constexpr double k_EtaMax = 45.0 ;
245245
246246} // namespace CubicHigh
247247
@@ -2057,7 +2057,7 @@ void DrawFullCircleAnnotations(canvas_ity::canvas& context, int canvasDim, float
20572057 {
20582058 radius = 1 .0F ;
20592059 float angle = angles[idx];
2060- float rads = angle * M_PI / 180 . 0f ;
2060+ float rads = angle * ebsdlib::constants::k_DegToRadF ;
20612061 float x = radius * (cos (rads));
20622062 float y = radius * (sin (rads));
20632063
0 commit comments