Skip to content

Commit c8e5882

Browse files
committed
fixup: ordering
1 parent 2fdf53d commit c8e5882

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/common/math/Constant.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ namespace Math {
2828
constexpr float sqrt3_f = 1.73205081f; // √3 sqrt3f
2929
constexpr float inv_sqrtpi_f = 1.77245385f; // 1÷√π inv_sqrtpif
3030
constexpr float inv_sqrt2_f = .707106781f; // 1÷√2 M_SQRT1_2f inv_sqrt2f
31-
constexpr float div2_sqrtpi_f = 1.12837917f; // 2÷√π M_2_SQRTPIf
3231
constexpr float inv_sqrt3_f = .577350269f; // 1÷√3 inv_sqrt3f
32+
constexpr float div2_sqrtpi_f = 1.12837917f; // 2÷√π M_2_SQRTPIf
3333

3434
// Type Name Value Operation GNU std::numbers
3535
constexpr double phi_d = 1.6180339887498948482; // φ phi
@@ -54,8 +54,8 @@ namespace Math {
5454
constexpr double sqrt3_d = 1.7320508075688772935; // √3 sqrt3
5555
constexpr double inv_sqrtpi_d = 1.7724538509055160273; // 1÷√π inv_sqrtpi
5656
constexpr double inv_sqrt2_d = .7071067811865475244; // 1÷√2 M_SQRT1_2 inv_sqrt2
57-
constexpr double div2_sqrtpi_d = 1.1283791670955125739; // 2÷√π M_2_SQRTPI
5857
constexpr double inv_sqrt3_d = .57735026918962576451; // 1÷√3 inv_sqrt3
58+
constexpr double div2_sqrtpi_d = 1.1283791670955125739; // 2÷√π M_2_SQRTPI
5959
}
6060

6161
#endif // COMMON_MATH_CONSTANT_H_

tools/math-constant/math-constant.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ class _inv_sqrt3:
221221
operation = "1÷√3"
222222
def compute(): return fdiv(1, sqrt(3))
223223

224+
constants.append(_inv_sqrt3)
225+
224226
class _div2_sqrtpi:
225227
name = "div2_sqrtpi"
226228
gnu = "M_2_SQRTPI"
@@ -230,8 +232,6 @@ def compute(): return fdiv(2, sqrt(mp.pi))
230232

231233
constants.append(_div2_sqrtpi)
232234

233-
constants.append(_inv_sqrt3)
234-
235235
types = []
236236

237237
class _float:

0 commit comments

Comments
 (0)