From 7d5f055547e70fa93ee9ac944e62f8d657b9dc55 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 19 Oct 2018 08:36:44 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Math/Math.h | 77 ---------------- src/libjin/Math/Matrix.cpp | 194 ----------------------------------------- src/libjin/Math/Matrix.h | 159 --------------------------------- src/libjin/Math/Quad.h | 17 ---- src/libjin/Math/Vector2.hpp | 40 --------- src/libjin/Math/Vector3.hpp | 41 --------- src/libjin/Math/Vector4.hpp | 45 ---------- src/libjin/Math/constant.h | 10 --- src/libjin/Math/je_constant.h | 10 +++ src/libjin/Math/je_math.h | 77 ++++++++++++++++ src/libjin/Math/je_matrix.cpp | 194 +++++++++++++++++++++++++++++++++++++++++ src/libjin/Math/je_matrix.h | 159 +++++++++++++++++++++++++++++++++ src/libjin/Math/je_quad.h | 17 ++++ src/libjin/Math/je_vector2.hpp | 40 +++++++++ src/libjin/Math/je_vector3.hpp | 41 +++++++++ src/libjin/Math/je_vector4.hpp | 45 ++++++++++ 16 files changed, 583 insertions(+), 583 deletions(-) delete mode 100644 src/libjin/Math/Math.h delete mode 100644 src/libjin/Math/Matrix.cpp delete mode 100644 src/libjin/Math/Matrix.h delete mode 100644 src/libjin/Math/Quad.h delete mode 100644 src/libjin/Math/Vector2.hpp delete mode 100644 src/libjin/Math/Vector3.hpp delete mode 100644 src/libjin/Math/Vector4.hpp delete mode 100644 src/libjin/Math/constant.h create mode 100644 src/libjin/Math/je_constant.h create mode 100644 src/libjin/Math/je_math.h create mode 100644 src/libjin/Math/je_matrix.cpp create mode 100644 src/libjin/Math/je_matrix.h create mode 100644 src/libjin/Math/je_quad.h create mode 100644 src/libjin/Math/je_vector2.hpp create mode 100644 src/libjin/Math/je_vector3.hpp create mode 100644 src/libjin/Math/je_vector4.hpp (limited to 'src/libjin/Math') diff --git a/src/libjin/Math/Math.h b/src/libjin/Math/Math.h deleted file mode 100644 index c1b5084..0000000 --- a/src/libjin/Math/Math.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef __LIBJIN_UTILS_MATH_H -#define __LIBJIN_UTILS_MATH_H - -#include "constant.h" -#include "matrix.h" -#include "quad.h" - -namespace jin -{ - namespace math - { - - #ifdef min - # undef min - #endif // min - #ifdef max - # undef max - #endif // max - - template - inline T min(T a, T b) - { - return a < b ? a : b; - } - - template - inline T max(T a, T b) - { - return a > b ? a : b; - } - - template - inline T clamp(T a, T mi, T ma) - { - return min(max(a, mi), ma); - } - - template - inline bool within(T a, T mi, T ma) - { - return a >= mi && a <= ma; - } - - template - inline bool without(T a, T mi, T ma) - { - return a < mi || a > ma; - } - - template - inline T abs(T a) - { - return a > 0 ? a : -a; - } - - template - inline T lowerBound(T a, T lower) - { - return a < lower ? lower : a; - } - - template - inline T upperBound(T a, T upper) - { - return a > upper ? upper : a; - } - - template - inline T lerp(T a, T b, float t) - { - return a + t * (b - a); - } - - } // namespace math -} // namespace jin - -#endif \ No newline at end of file diff --git a/src/libjin/Math/Matrix.cpp b/src/libjin/Math/Matrix.cpp deleted file mode 100644 index 9f933f8..0000000 --- a/src/libjin/Math/Matrix.cpp +++ /dev/null @@ -1,194 +0,0 @@ -#include "Matrix.h" - -#include // memcpy -#include - -namespace jin -{ - namespace math - { - - const Matrix Matrix::Identity; - - // | e0 e4 e8 e12 | - // | e1 e5 e9 e13 | - // | e2 e6 e10 e14 | - // | e3 e7 e11 e15 | - - Matrix::Matrix() - { - setIdentity(); - } - - Matrix::~Matrix() - { - } - - void Matrix::setOrtho(float l, float r, float b, float t, float n, float f) - { - setIdentity(); - float w = r - l; - float h = t - b; - float z = f - n; - e[0] = 2 / w; - e[5] = 2 / h; - e[10] = -2 / z; - e[12] = -(r + l) / w; - e[13] = -(t + b) / h; - e[14] = -(f + n) / z; - e[15] = 1; - } - - // | e0 e4 e8 e12 | - // | e1 e5 e9 e13 | - // | e2 e6 e10 e14 | - // | e3 e7 e11 e15 | - // | e0 e4 e8 e12 | - // | e1 e5 e9 e13 | - // | e2 e6 e10 e14 | - // | e3 e7 e11 e15 | - - Matrix Matrix::operator * (const Matrix & m) const - { - Matrix t; - - t.e[0] = (e[0] * m.e[0]) + (e[4] * m.e[1]) + (e[8] * m.e[2]) + (e[12] * m.e[3]); - t.e[4] = (e[0] * m.e[4]) + (e[4] * m.e[5]) + (e[8] * m.e[6]) + (e[12] * m.e[7]); - t.e[8] = (e[0] * m.e[8]) + (e[4] * m.e[9]) + (e[8] * m.e[10]) + (e[12] * m.e[11]); - t.e[12] = (e[0] * m.e[12]) + (e[4] * m.e[13]) + (e[8] * m.e[14]) + (e[12] * m.e[15]); - - t.e[1] = (e[1] * m.e[0]) + (e[5] * m.e[1]) + (e[9] * m.e[2]) + (e[13] * m.e[3]); - t.e[5] = (e[1] * m.e[4]) + (e[5] * m.e[5]) + (e[9] * m.e[6]) + (e[13] * m.e[7]); - t.e[9] = (e[1] * m.e[8]) + (e[5] * m.e[9]) + (e[9] * m.e[10]) + (e[13] * m.e[11]); - t.e[13] = (e[1] * m.e[12]) + (e[5] * m.e[13]) + (e[9] * m.e[14]) + (e[13] * m.e[15]); - - t.e[2] = (e[2] * m.e[0]) + (e[6] * m.e[1]) + (e[10] * m.e[2]) + (e[14] * m.e[3]); - t.e[6] = (e[2] * m.e[4]) + (e[6] * m.e[5]) + (e[10] * m.e[6]) + (e[14] * m.e[7]); - t.e[10] = (e[2] * m.e[8]) + (e[6] * m.e[9]) + (e[10] * m.e[10]) + (e[14] * m.e[11]); - t.e[14] = (e[2] * m.e[12]) + (e[6] * m.e[13]) + (e[10] * m.e[14]) + (e[14] * m.e[15]); - - t.e[3] = (e[3] * m.e[0]) + (e[7] * m.e[1]) + (e[11] * m.e[2]) + (e[15] * m.e[3]); - t.e[7] = (e[3] * m.e[4]) + (e[7] * m.e[5]) + (e[11] * m.e[6]) + (e[15] * m.e[7]); - t.e[11] = (e[3] * m.e[8]) + (e[7] * m.e[9]) + (e[11] * m.e[10]) + (e[15] * m.e[11]); - t.e[15] = (e[3] * m.e[12]) + (e[7] * m.e[13]) + (e[11] * m.e[14]) + (e[15] * m.e[15]); - - return t; - } - - void Matrix::operator *= (const Matrix & m) - { - Matrix t = (*this) * m; - memcpy((void*)this->e, (void*)t.e, sizeof(float) * 16); - } - - const float * Matrix::getElements() const - { - return e; - } - - void Matrix::setIdentity() - { - memset(e, 0, sizeof(float) * 16); - e[0] = e[5] = e[10] = e[15] = 1; - } - - void Matrix::setTranslation(float x, float y) - { - setIdentity(); - e[12] = x; - e[13] = y; - } - - void Matrix::setRotation(float rad) - { - setIdentity(); - float c = cos(rad), s = sin(rad); - e[0] = c; e[4] = -s; - e[1] = s; e[5] = c; - } - - void Matrix::setScale(float sx, float sy) - { - setIdentity(); - e[0] = sx; - e[5] = sy; - } - - void Matrix::setShear(float kx, float ky) - { - setIdentity(); - e[1] = ky; - e[4] = kx; - } - - void Matrix::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy) - { - memset(e, 0, sizeof(float) * 16); // zero out matrix - float c = cos(angle), s = sin(angle); - // matrix multiplication carried out on paper: - // |1 x| |c -s | |sx | |1 -ox| - // | 1 y| |s c | | sy | | 1 -oy| - // | 1 | | 1 | | 1 | | 1 | - // | 1| | 1| | 1| | 1 | - // move rotate scale origin - e[10] = e[15] = 1.0f; - e[0] = c * sx ; // = a - e[1] = s * sx ; // = b - e[4] = - s * sy; // = c - e[5] = c * sy; // = d - e[12] = x - ox * e[0] - oy * e[4]; - e[13] = y - ox * e[1] - oy * e[5]; - } - - void Matrix::translate(float x, float y) - { - Matrix t; - t.setTranslation(x, y); - this->operator *=(t); - } - - void Matrix::rotate(float rad) - { - Matrix t; - t.setRotation(rad); - this->operator *=(t); - } - - void Matrix::scale(float sx, float sy) - { - Matrix t; - t.setScale(sx, sy); - this->operator *=(t); - } - - void Matrix::shear(float kx, float ky) - { - Matrix t; - t.setShear(kx, ky); - this->operator *=(t); - } - - // | x | - // | y | - // | 0 | - // | 1 | - // | e0 e4 e8 e12 | - // | e1 e5 e9 e13 | - // | e2 e6 e10 e14 | - // | e3 e7 e11 e15 | - - void Matrix::transform(vertex * dst, const vertex * src, int size) const - { - for (int i = 0; i - class Vector2 - { - public: - Vector2() - { - data[0] = data[1] = 0; - } - Vector2(T _x, T _y) - { - data[0] = _x; - data[1] = _y; - } - Vector2(const Vector2& v) - { - data[0] = v.data[0]; - data[1] = v.data[1]; - } - - T &x = data[0], &y = data[1]; // xy - T &w = data[0], &h = data[1]; // wh - T &colum = data[0], &row = data[1]; // colum row - - private: - T data[2]; - - }; - - } // namespace math -} // namespace jin - -#endif \ No newline at end of file diff --git a/src/libjin/Math/Vector3.hpp b/src/libjin/Math/Vector3.hpp deleted file mode 100644 index 96d4e9a..0000000 --- a/src/libjin/Math/Vector3.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef __LIBJIN_VECTOR3_H -#define __LIBJIN_VECTOR3_H - -namespace jin -{ - namespace math - { - - template - class Vector3 - { - public: - Vector3() - { - data[0] = data[1] = data[2] = 0; - } - Vector3(T _x, T _y, T _z) - { - data[0] = _x; - data[1] = _y; - data[2] = _z; - } - Vector3(const Vector3& v) - { - data[0] = v.data[0]; - data[1] = v.data[1]; - data[2] = v.data[2]; - } - - T &x = data[0], &y = data[1], &z = data[2]; // xyz - T &r = data[0], &g = data[1], &b = data[2]; // rgb - - private: - T data[3]; - - }; - - } // namespace math -} // namespace jin - -#endif \ No newline at end of file diff --git a/src/libjin/Math/Vector4.hpp b/src/libjin/Math/Vector4.hpp deleted file mode 100644 index 35be056..0000000 --- a/src/libjin/Math/Vector4.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef __LIBJIN_VECTOR4_H -#define __LIBJIN_VECTOR4_H - -namespace jin -{ - namespace math - { - - template - class Vector4 - { - public: - Vector4() - { - data[0] = data[1] = data[2] = data[3] = 0; - } - Vector4(T _x, T _y, T _z, T _t) - { - data[0] = _x; - data[1] = _y; - data[2] = _z; - data[3] = _t; - } - Vector4(const Vector4& v) - { - data[0] = v.data[0]; - data[1] = v.data[1]; - data[2] = v.data[2]; - data[3] = v.data[3]; - } - - T &x = data[0], &y = data[1], &z = data[2], &t = data[3]; // xyzt - T &w = data[2], &h = data[3]; // xywh - T &r = data[0], &g = data[1], &b = data[2], &a = data[3]; // rgb - T &left = data[0], &right = data[1], &top = data[2], &bottom = data[3]; // lrtb - - private: - T data[4]; - - }; - - } // namespace math -} // namespace jin - -#endif \ No newline at end of file diff --git a/src/libjin/Math/constant.h b/src/libjin/Math/constant.h deleted file mode 100644 index f8e0f5a..0000000 --- a/src/libjin/Math/constant.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __LIBJIN_MATH_CONSTANT_H -#define __LIBJIN_MATH_CONSTANT_H - -#define PI 3.1415926f - -// int16 范围 -#define INT16_RANGE_LEFT -32768 -#define INT16_RANGE_RIGHT 32767 - -#endif \ No newline at end of file diff --git a/src/libjin/Math/je_constant.h b/src/libjin/Math/je_constant.h new file mode 100644 index 0000000..f8e0f5a --- /dev/null +++ b/src/libjin/Math/je_constant.h @@ -0,0 +1,10 @@ +#ifndef __LIBJIN_MATH_CONSTANT_H +#define __LIBJIN_MATH_CONSTANT_H + +#define PI 3.1415926f + +// int16 范围 +#define INT16_RANGE_LEFT -32768 +#define INT16_RANGE_RIGHT 32767 + +#endif \ No newline at end of file diff --git a/src/libjin/Math/je_math.h b/src/libjin/Math/je_math.h new file mode 100644 index 0000000..b6a2ffd --- /dev/null +++ b/src/libjin/Math/je_math.h @@ -0,0 +1,77 @@ +#ifndef __LIBJIN_UTILS_MATH_H +#define __LIBJIN_UTILS_MATH_H + +#include "je_constant.h" +#include "je_matrix.h" +#include "je_quad.h" + +namespace jin +{ + namespace math + { + + #ifdef min + # undef min + #endif // min + #ifdef max + # undef max + #endif // max + + template + inline T min(T a, T b) + { + return a < b ? a : b; + } + + template + inline T max(T a, T b) + { + return a > b ? a : b; + } + + template + inline T clamp(T a, T mi, T ma) + { + return min(max(a, mi), ma); + } + + template + inline bool within(T a, T mi, T ma) + { + return a >= mi && a <= ma; + } + + template + inline bool without(T a, T mi, T ma) + { + return a < mi || a > ma; + } + + template + inline T abs(T a) + { + return a > 0 ? a : -a; + } + + template + inline T lowerBound(T a, T lower) + { + return a < lower ? lower : a; + } + + template + inline T upperBound(T a, T upper) + { + return a > upper ? upper : a; + } + + template + inline T lerp(T a, T b, float t) + { + return a + t * (b - a); + } + + } // namespace math +} // namespace jin + +#endif \ No newline at end of file diff --git a/src/libjin/Math/je_matrix.cpp b/src/libjin/Math/je_matrix.cpp new file mode 100644 index 0000000..3a878a0 --- /dev/null +++ b/src/libjin/Math/je_matrix.cpp @@ -0,0 +1,194 @@ +#include "je_matrix.h" + +#include // memcpy +#include + +namespace jin +{ + namespace math + { + + const Matrix Matrix::Identity; + + // | e0 e4 e8 e12 | + // | e1 e5 e9 e13 | + // | e2 e6 e10 e14 | + // | e3 e7 e11 e15 | + + Matrix::Matrix() + { + setIdentity(); + } + + Matrix::~Matrix() + { + } + + void Matrix::setOrtho(float l, float r, float b, float t, float n, float f) + { + setIdentity(); + float w = r - l; + float h = t - b; + float z = f - n; + e[0] = 2 / w; + e[5] = 2 / h; + e[10] = -2 / z; + e[12] = -(r + l) / w; + e[13] = -(t + b) / h; + e[14] = -(f + n) / z; + e[15] = 1; + } + + // | e0 e4 e8 e12 | + // | e1 e5 e9 e13 | + // | e2 e6 e10 e14 | + // | e3 e7 e11 e15 | + // | e0 e4 e8 e12 | + // | e1 e5 e9 e13 | + // | e2 e6 e10 e14 | + // | e3 e7 e11 e15 | + + Matrix Matrix::operator * (const Matrix & m) const + { + Matrix t; + + t.e[0] = (e[0] * m.e[0]) + (e[4] * m.e[1]) + (e[8] * m.e[2]) + (e[12] * m.e[3]); + t.e[4] = (e[0] * m.e[4]) + (e[4] * m.e[5]) + (e[8] * m.e[6]) + (e[12] * m.e[7]); + t.e[8] = (e[0] * m.e[8]) + (e[4] * m.e[9]) + (e[8] * m.e[10]) + (e[12] * m.e[11]); + t.e[12] = (e[0] * m.e[12]) + (e[4] * m.e[13]) + (e[8] * m.e[14]) + (e[12] * m.e[15]); + + t.e[1] = (e[1] * m.e[0]) + (e[5] * m.e[1]) + (e[9] * m.e[2]) + (e[13] * m.e[3]); + t.e[5] = (e[1] * m.e[4]) + (e[5] * m.e[5]) + (e[9] * m.e[6]) + (e[13] * m.e[7]); + t.e[9] = (e[1] * m.e[8]) + (e[5] * m.e[9]) + (e[9] * m.e[10]) + (e[13] * m.e[11]); + t.e[13] = (e[1] * m.e[12]) + (e[5] * m.e[13]) + (e[9] * m.e[14]) + (e[13] * m.e[15]); + + t.e[2] = (e[2] * m.e[0]) + (e[6] * m.e[1]) + (e[10] * m.e[2]) + (e[14] * m.e[3]); + t.e[6] = (e[2] * m.e[4]) + (e[6] * m.e[5]) + (e[10] * m.e[6]) + (e[14] * m.e[7]); + t.e[10] = (e[2] * m.e[8]) + (e[6] * m.e[9]) + (e[10] * m.e[10]) + (e[14] * m.e[11]); + t.e[14] = (e[2] * m.e[12]) + (e[6] * m.e[13]) + (e[10] * m.e[14]) + (e[14] * m.e[15]); + + t.e[3] = (e[3] * m.e[0]) + (e[7] * m.e[1]) + (e[11] * m.e[2]) + (e[15] * m.e[3]); + t.e[7] = (e[3] * m.e[4]) + (e[7] * m.e[5]) + (e[11] * m.e[6]) + (e[15] * m.e[7]); + t.e[11] = (e[3] * m.e[8]) + (e[7] * m.e[9]) + (e[11] * m.e[10]) + (e[15] * m.e[11]); + t.e[15] = (e[3] * m.e[12]) + (e[7] * m.e[13]) + (e[11] * m.e[14]) + (e[15] * m.e[15]); + + return t; + } + + void Matrix::operator *= (const Matrix & m) + { + Matrix t = (*this) * m; + memcpy((void*)this->e, (void*)t.e, sizeof(float) * 16); + } + + const float * Matrix::getElements() const + { + return e; + } + + void Matrix::setIdentity() + { + memset(e, 0, sizeof(float) * 16); + e[0] = e[5] = e[10] = e[15] = 1; + } + + void Matrix::setTranslation(float x, float y) + { + setIdentity(); + e[12] = x; + e[13] = y; + } + + void Matrix::setRotation(float rad) + { + setIdentity(); + float c = cos(rad), s = sin(rad); + e[0] = c; e[4] = -s; + e[1] = s; e[5] = c; + } + + void Matrix::setScale(float sx, float sy) + { + setIdentity(); + e[0] = sx; + e[5] = sy; + } + + void Matrix::setShear(float kx, float ky) + { + setIdentity(); + e[1] = ky; + e[4] = kx; + } + + void Matrix::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy) + { + memset(e, 0, sizeof(float) * 16); // zero out matrix + float c = cos(angle), s = sin(angle); + // matrix multiplication carried out on paper: + // |1 x| |c -s | |sx | |1 -ox| + // | 1 y| |s c | | sy | | 1 -oy| + // | 1 | | 1 | | 1 | | 1 | + // | 1| | 1| | 1| | 1 | + // move rotate scale origin + e[10] = e[15] = 1.0f; + e[0] = c * sx ; // = a + e[1] = s * sx ; // = b + e[4] = - s * sy; // = c + e[5] = c * sy; // = d + e[12] = x - ox * e[0] - oy * e[4]; + e[13] = y - ox * e[1] - oy * e[5]; + } + + void Matrix::translate(float x, float y) + { + Matrix t; + t.setTranslation(x, y); + this->operator *=(t); + } + + void Matrix::rotate(float rad) + { + Matrix t; + t.setRotation(rad); + this->operator *=(t); + } + + void Matrix::scale(float sx, float sy) + { + Matrix t; + t.setScale(sx, sy); + this->operator *=(t); + } + + void Matrix::shear(float kx, float ky) + { + Matrix t; + t.setShear(kx, ky); + this->operator *=(t); + } + + // | x | + // | y | + // | 0 | + // | 1 | + // | e0 e4 e8 e12 | + // | e1 e5 e9 e13 | + // | e2 e6 e10 e14 | + // | e3 e7 e11 e15 | + + void Matrix::transform(vertex * dst, const vertex * src, int size) const + { + for (int i = 0; i + class Vector2 + { + public: + Vector2() + { + data[0] = data[1] = 0; + } + Vector2(T _x, T _y) + { + data[0] = _x; + data[1] = _y; + } + Vector2(const Vector2& v) + { + data[0] = v.data[0]; + data[1] = v.data[1]; + } + + T &x = data[0], &y = data[1]; // xy + T &w = data[0], &h = data[1]; // wh + T &colum = data[0], &row = data[1]; // colum row + + private: + T data[2]; + + }; + + } // namespace math +} // namespace jin + +#endif \ No newline at end of file diff --git a/src/libjin/Math/je_vector3.hpp b/src/libjin/Math/je_vector3.hpp new file mode 100644 index 0000000..96d4e9a --- /dev/null +++ b/src/libjin/Math/je_vector3.hpp @@ -0,0 +1,41 @@ +#ifndef __LIBJIN_VECTOR3_H +#define __LIBJIN_VECTOR3_H + +namespace jin +{ + namespace math + { + + template + class Vector3 + { + public: + Vector3() + { + data[0] = data[1] = data[2] = 0; + } + Vector3(T _x, T _y, T _z) + { + data[0] = _x; + data[1] = _y; + data[2] = _z; + } + Vector3(const Vector3& v) + { + data[0] = v.data[0]; + data[1] = v.data[1]; + data[2] = v.data[2]; + } + + T &x = data[0], &y = data[1], &z = data[2]; // xyz + T &r = data[0], &g = data[1], &b = data[2]; // rgb + + private: + T data[3]; + + }; + + } // namespace math +} // namespace jin + +#endif \ No newline at end of file diff --git a/src/libjin/Math/je_vector4.hpp b/src/libjin/Math/je_vector4.hpp new file mode 100644 index 0000000..35be056 --- /dev/null +++ b/src/libjin/Math/je_vector4.hpp @@ -0,0 +1,45 @@ +#ifndef __LIBJIN_VECTOR4_H +#define __LIBJIN_VECTOR4_H + +namespace jin +{ + namespace math + { + + template + class Vector4 + { + public: + Vector4() + { + data[0] = data[1] = data[2] = data[3] = 0; + } + Vector4(T _x, T _y, T _z, T _t) + { + data[0] = _x; + data[1] = _y; + data[2] = _z; + data[3] = _t; + } + Vector4(const Vector4& v) + { + data[0] = v.data[0]; + data[1] = v.data[1]; + data[2] = v.data[2]; + data[3] = v.data[3]; + } + + T &x = data[0], &y = data[1], &z = data[2], &t = data[3]; // xyzt + T &w = data[2], &h = data[3]; // xywh + T &r = data[0], &g = data[1], &b = data[2], &a = data[3]; // rgb + T &left = data[0], &right = data[1], &top = data[2], &bottom = data[3]; // lrtb + + private: + T data[4]; + + }; + + } // namespace math +} // namespace jin + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0