diff --git a/build_linux64/libamsmathutil25.linux64.a b/build_linux64/libamsmathutil25.linux64.a index e0936f3..b4b1f64 100644 Binary files a/build_linux64/libamsmathutil25.linux64.a and b/build_linux64/libamsmathutil25.linux64.a differ diff --git a/build_linux64/objstore/amscpptemplate25a_src2.o b/build_linux64/objstore/amscpptemplate25a_src2.o index 96254c6..03a41ce 100644 Binary files a/build_linux64/objstore/amscpptemplate25a_src2.o and b/build_linux64/objstore/amscpptemplate25a_src2.o differ diff --git a/build_linux64/objstore/amscpptemplate25a_template.o b/build_linux64/objstore/amscpptemplate25a_template.o index 06d6ac8..1fc5d71 100644 Binary files a/build_linux64/objstore/amscpptemplate25a_template.o and b/build_linux64/objstore/amscpptemplate25a_template.o differ diff --git a/build_linux64/objstore/amsmathtuil25_test1.o b/build_linux64/objstore/amsmathtuil25_test1.o index 40c3d92..12ad038 100644 Binary files a/build_linux64/objstore/amsmathtuil25_test1.o and b/build_linux64/objstore/amsmathtuil25_test1.o differ diff --git a/build_linux64/objstore/amsmathutiil25_random.o b/build_linux64/objstore/amsmathutiil25_random.o index 47a5603..b3dcf6b 100644 Binary files a/build_linux64/objstore/amsmathutiil25_random.o and b/build_linux64/objstore/amsmathutiil25_random.o differ diff --git a/build_linux64/objstore/amsmathutil25_amsarray.o b/build_linux64/objstore/amsmathutil25_amsarray.o index ab18391..4c01ecf 100644 Binary files a/build_linux64/objstore/amsmathutil25_amsarray.o and b/build_linux64/objstore/amsmathutil25_amsarray.o differ diff --git a/build_linux64/objstore/amsmathutil25_amsarray_sort.o b/build_linux64/objstore/amsmathutil25_amsarray_sort.o index a339892..4960f3e 100644 Binary files a/build_linux64/objstore/amsmathutil25_amsarray_sort.o and b/build_linux64/objstore/amsmathutil25_amsarray_sort.o differ diff --git a/build_linux64/objstore/amsmathutil25_mathfns1.o b/build_linux64/objstore/amsmathutil25_mathfns1.o index 0e62279..7def272 100644 Binary files a/build_linux64/objstore/amsmathutil25_mathfns1.o and b/build_linux64/objstore/amsmathutil25_mathfns1.o differ diff --git a/build_linux64/objstore/amsmathutil25_utils1.o b/build_linux64/objstore/amsmathutil25_utils1.o index 3f6b99e..9232ac3 100644 Binary files a/build_linux64/objstore/amsmathutil25_utils1.o and b/build_linux64/objstore/amsmathutil25_utils1.o differ diff --git a/build_linux64/objstore/amsmathutil25_vec2.o b/build_linux64/objstore/amsmathutil25_vec2.o index f6a6e54..6540de0 100644 Binary files a/build_linux64/objstore/amsmathutil25_vec2.o and b/build_linux64/objstore/amsmathutil25_vec2.o differ diff --git a/build_linux64/objstore/amsmathutil25_vec2f.o b/build_linux64/objstore/amsmathutil25_vec2f.o index 43b9398..3e19255 100644 Binary files a/build_linux64/objstore/amsmathutil25_vec2f.o and b/build_linux64/objstore/amsmathutil25_vec2f.o differ diff --git a/build_linux64/objstore/amsmathutil25_vec3.o b/build_linux64/objstore/amsmathutil25_vec3.o index 903d5f2..452c0fb 100644 Binary files a/build_linux64/objstore/amsmathutil25_vec3.o and b/build_linux64/objstore/amsmathutil25_vec3.o differ diff --git a/build_linux64/objstore/amsmathutil25_vec3f.o b/build_linux64/objstore/amsmathutil25_vec3f.o index 6ae367b..3b75d00 100644 Binary files a/build_linux64/objstore/amsmathutil25_vec3f.o and b/build_linux64/objstore/amsmathutil25_vec3f.o differ diff --git a/build_linux64/objstore/amsmathutil25_vec4.o b/build_linux64/objstore/amsmathutil25_vec4.o index 191a211..db47190 100644 Binary files a/build_linux64/objstore/amsmathutil25_vec4.o and b/build_linux64/objstore/amsmathutil25_vec4.o differ diff --git a/build_linux64/objstore/amsmathutil25_vec4f.o b/build_linux64/objstore/amsmathutil25_vec4f.o index dc12f7c..ea2dbb9 100644 Binary files a/build_linux64/objstore/amsmathutil25_vec4f.o and b/build_linux64/objstore/amsmathutil25_vec4f.o differ diff --git a/build_linux64/objstore/amsmathutil2t_complex128.o b/build_linux64/objstore/amsmathutil2t_complex128.o index fdae151..be57f9f 100644 Binary files a/build_linux64/objstore/amsmathutil2t_complex128.o and b/build_linux64/objstore/amsmathutil2t_complex128.o differ diff --git a/build_linux64/objstore/amsmathutil2t_complex64.o b/build_linux64/objstore/amsmathutil2t_complex64.o index 866300f..e2bbf48 100644 Binary files a/build_linux64/objstore/amsmathutil2t_complex64.o and b/build_linux64/objstore/amsmathutil2t_complex64.o differ diff --git a/build_linux64/tests b/build_linux64/tests index 1b1d8d6..aed5fd0 100644 Binary files a/build_linux64/tests and b/build_linux64/tests differ diff --git a/include/amsmathutil25/math/amsmathutil25_vec2.hpp b/include/amsmathutil25/math/amsmathutil25_vec2.hpp index a6b9397..c132286 100644 --- a/include/amsmathutil25/math/amsmathutil25_vec2.hpp +++ b/include/amsmathutil25/math/amsmathutil25_vec2.hpp @@ -14,7 +14,7 @@ public: vec2(double _x, double _y); vec2(const vec2 &rhs); vec2& operator=(const vec2 &rhs); - bool operator==(vec2 rhs); + bool operator==(const vec2 rhs) const; vec2 operator+(vec2 rhs) const; vec2 operator-(vec2 rhs) const; @@ -56,7 +56,7 @@ public: mat2(const vec2 _col1, const vec2 _col2); mat2& operator=(const mat2 rhs); - bool operator==(const mat2 rhs); + bool operator==(const mat2 rhs) const; mat2 operator+(mat2 rhs) const; mat2 operator-(mat2 rhs) const; diff --git a/include/amsmathutil25/math/amsmathutil25_vec2f.hpp b/include/amsmathutil25/math/amsmathutil25_vec2f.hpp index 646a058..883552d 100644 --- a/include/amsmathutil25/math/amsmathutil25_vec2f.hpp +++ b/include/amsmathutil25/math/amsmathutil25_vec2f.hpp @@ -14,7 +14,7 @@ public: vec2f(float _x, float _y); vec2f(const vec2f &rhs); vec2f& operator=(const vec2f &rhs); - bool operator==(vec2f rhs); + bool operator==(const vec2f rhs) const; vec2f operator+(vec2f rhs) const; vec2f operator-(vec2f rhs) const; @@ -56,7 +56,7 @@ public: mat2f(const vec2f _col1, const vec2f _col2); mat2f& operator=(const mat2f rhs); - bool operator==(const mat2f rhs); + bool operator==(const mat2f rhs) const; mat2f operator+(mat2f rhs) const; mat2f operator-(mat2f rhs) const; diff --git a/include/amsmathutil25/math/amsmathutil25_vec2i.hpp b/include/amsmathutil25/math/amsmathutil25_vec2i.hpp new file mode 100644 index 0000000..205cbe0 --- /dev/null +++ b/include/amsmathutil25/math/amsmathutil25_vec2i.hpp @@ -0,0 +1,31 @@ +#ifndef __AMSMATHUTIL25_VEC2I_HPP__ +#define __AMSMATHUTIL25_VEC2I_HPP__ + +namespace ams +{ + +class vec2i +{ +public: + int x; + int y; + + vec2i(); + vec2i(float _x, float _y); + vec2i(const vec2i &rhs); + vec2i& operator=(const vec2i &rhs); + bool operator==(const vec2i rhs) const; + + vec2i operator+(vec2i rhs) const; + vec2i operator-(vec2i rhs) const; + vec2i operator*(float rhs) const; + vec2i operator/(float rhs) const; + friend vec2i operator-(vec2i rhs); + + float& operator[](int ind); + const float& operator[](int ind) const; +}; + + + +}; diff --git a/include/amsmathutil25/math/amsmathutil25_vec3.hpp b/include/amsmathutil25/math/amsmathutil25_vec3.hpp index 7b06002..9d20220 100644 --- a/include/amsmathutil25/math/amsmathutil25_vec3.hpp +++ b/include/amsmathutil25/math/amsmathutil25_vec3.hpp @@ -19,7 +19,7 @@ public: vec3(double _x, double _y, double _z); vec3(const vec3 &rhs); vec3& operator=(const vec3 &rhs); - bool operator==(vec3 rhs); + bool operator==(const vec3 rhs) const; vec3 operator+(vec3 rhs) const; vec3 operator-(vec3 rhs) const; @@ -60,7 +60,7 @@ public: mat3(const vec3 _col1, const vec3 _col2, const vec3 _col3); mat3& operator=(const mat3 rhs); - bool operator==(const mat3 rhs); + bool operator==(const mat3 rhs) const; mat3 operator+(mat3 rhs) const; mat3 operator-(mat3 rhs) const; diff --git a/include/amsmathutil25/math/amsmathutil25_vec3f.hpp b/include/amsmathutil25/math/amsmathutil25_vec3f.hpp index 16b6bfe..85a4e25 100644 --- a/include/amsmathutil25/math/amsmathutil25_vec3f.hpp +++ b/include/amsmathutil25/math/amsmathutil25_vec3f.hpp @@ -19,7 +19,7 @@ public: vec3f(float _x, float _y, float _z); vec3f(const vec3f &rhs); vec3f& operator=(const vec3f &rhs); - bool operator==(vec3f rhs); + bool operator==(const vec3f rhs) const; vec3f operator+(vec3f rhs) const; vec3f operator-(vec3f rhs) const; @@ -60,7 +60,7 @@ public: mat3f(const vec3f _col1, const vec3f _col2, const vec3f _col3); mat3f& operator=(const mat3f rhs); - bool operator==(const mat3f rhs); + bool operator==(const mat3f rhs) const; mat3f operator+(mat3f rhs) const; mat3f operator-(mat3f rhs) const; diff --git a/include/amsmathutil25/math/amsmathutil25_vec4.hpp b/include/amsmathutil25/math/amsmathutil25_vec4.hpp index daf90d3..022b76a 100644 --- a/include/amsmathutil25/math/amsmathutil25_vec4.hpp +++ b/include/amsmathutil25/math/amsmathutil25_vec4.hpp @@ -19,7 +19,7 @@ public: vec4(double _x, double _y, double _z, double _w); vec4(const vec4 &rhs); vec4& operator=(const vec4 &rhs); - bool operator==(vec4 rhs); + bool operator==(const vec4 rhs) const; vec4 operator+(vec4 rhs) const; vec4 operator-(vec4 rhs) const; @@ -62,7 +62,7 @@ public: mat4(const vec4 _col1, const vec4 _col2, const vec4 _col3, const vec4 _col4); mat4& operator=(const mat4 rhs); - bool operator==(const mat4 rhs); + bool operator==(const mat4 rhs) const; mat4 operator+(mat4 rhs) const; mat4 operator-(mat4 rhs) const; diff --git a/include/amsmathutil25/math/amsmathutil25_vec4f.hpp b/include/amsmathutil25/math/amsmathutil25_vec4f.hpp index feda1c6..070b62d 100644 --- a/include/amsmathutil25/math/amsmathutil25_vec4f.hpp +++ b/include/amsmathutil25/math/amsmathutil25_vec4f.hpp @@ -19,7 +19,7 @@ public: vec4f(float _x, float _y, float _z, float _w); vec4f(const vec4f &rhs); vec4f& operator=(const vec4f &rhs); - bool operator==(vec4f rhs); + bool operator==(const vec4f rhs) const; vec4f operator+(vec4f rhs) const; vec4f operator-(vec4f rhs) const; @@ -62,7 +62,7 @@ public: mat4f(const vec4f _col1, const vec4f _col2, const vec4f _col3, const vec4f _col4); mat4f& operator=(const mat4f rhs); - bool operator==(const mat4f rhs); + bool operator==(const mat4f rhs) const; mat4f operator+(mat4f rhs) const; mat4f operator-(mat4f rhs) const; diff --git a/src/amsmathutil25/math/amsmathutil25_vec2.cpp b/src/amsmathutil25/math/amsmathutil25_vec2.cpp index dc29b80..d197100 100644 --- a/src/amsmathutil25/math/amsmathutil25_vec2.cpp +++ b/src/amsmathutil25/math/amsmathutil25_vec2.cpp @@ -27,7 +27,7 @@ vec2& vec2::operator=(const vec2 &rhs) return *this; } -bool vec2::operator==(vec2 rhs) +bool vec2::operator==(const vec2 rhs) const { bool ret = 1; ret = ret & (rhs.x == x); @@ -236,7 +236,7 @@ mat2& mat2::operator=(const mat2 rhs) return *this; } -bool mat2::operator==(const mat2 rhs) +bool mat2::operator==(const mat2 rhs) const { bool ret = 1; int I; diff --git a/src/amsmathutil25/math/amsmathutil25_vec2f.cpp b/src/amsmathutil25/math/amsmathutil25_vec2f.cpp index 2c782fe..3983ad5 100644 --- a/src/amsmathutil25/math/amsmathutil25_vec2f.cpp +++ b/src/amsmathutil25/math/amsmathutil25_vec2f.cpp @@ -26,7 +26,7 @@ vec2f& vec2f::operator=(const vec2f &rhs) return *this; } -bool vec2f::operator==(vec2f rhs) +bool vec2f::operator==(const vec2f rhs) const { bool ret = 1; ret = ret & (rhs.x == x); @@ -233,7 +233,7 @@ mat2f& mat2f::operator=(const mat2f rhs) return *this; } -bool mat2f::operator==(const mat2f rhs) +bool mat2f::operator==(const mat2f rhs) const { bool ret = 1; int I; diff --git a/src/amsmathutil25/math/amsmathutil25_vec3.cpp b/src/amsmathutil25/math/amsmathutil25_vec3.cpp index 213fe4e..e39bd83 100644 --- a/src/amsmathutil25/math/amsmathutil25_vec3.cpp +++ b/src/amsmathutil25/math/amsmathutil25_vec3.cpp @@ -35,7 +35,7 @@ vec3& vec3::operator=(const vec3 &rhs) return *this; } -bool vec3::operator==(vec3 rhs) +bool vec3::operator==(const vec3 rhs) const { return ((this->x == rhs.x) && (this->y == rhs.y) && (this->z == rhs.z)); } @@ -266,7 +266,7 @@ mat3& mat3::operator=(const mat3 rhs) return *this; } -bool mat3::operator==(const mat3 rhs) +bool mat3::operator==(const mat3 rhs) const { bool ret = 1; int I; diff --git a/src/amsmathutil25/math/amsmathutil25_vec3f.cpp b/src/amsmathutil25/math/amsmathutil25_vec3f.cpp index 75ab328..f04c174 100644 --- a/src/amsmathutil25/math/amsmathutil25_vec3f.cpp +++ b/src/amsmathutil25/math/amsmathutil25_vec3f.cpp @@ -35,7 +35,7 @@ vec3f& vec3f::operator=(const vec3f &rhs) return *this; } -bool vec3f::operator==(vec3f rhs) +bool vec3f::operator==(const vec3f rhs) const { return ((this->x == rhs.x) && (this->y == rhs.y) && (this->z == rhs.z)); } @@ -266,7 +266,7 @@ mat3f& mat3f::operator=(const mat3f rhs) return *this; } -bool mat3f::operator==(const mat3f rhs) +bool mat3f::operator==(const mat3f rhs) const { bool ret = 1; int I; diff --git a/src/amsmathutil25/math/amsmathutil25_vec4.cpp b/src/amsmathutil25/math/amsmathutil25_vec4.cpp index 9643d91..905c30e 100644 --- a/src/amsmathutil25/math/amsmathutil25_vec4.cpp +++ b/src/amsmathutil25/math/amsmathutil25_vec4.cpp @@ -41,7 +41,7 @@ vec4& vec4::operator=(const vec4 &rhs) return *this; } -bool vec4::operator==(vec4 rhs) +bool vec4::operator==(const vec4 rhs) const { return ((this->x == rhs.x) && (this->y == rhs.y) && (this->z == rhs.z) && (this->w == rhs.w)); } @@ -268,7 +268,7 @@ mat4& mat4::operator=(const mat4 rhs) return *this; } -bool mat4::operator==(const mat4 rhs) +bool mat4::operator==(const mat4 rhs) const { bool ret = 1; int I; diff --git a/src/amsmathutil25/math/amsmathutil25_vec4f.cpp b/src/amsmathutil25/math/amsmathutil25_vec4f.cpp index 2b3ceb1..e0a21d5 100644 --- a/src/amsmathutil25/math/amsmathutil25_vec4f.cpp +++ b/src/amsmathutil25/math/amsmathutil25_vec4f.cpp @@ -41,7 +41,7 @@ vec4f& vec4f::operator=(const vec4f &rhs) return *this; } -bool vec4f::operator==(vec4f rhs) +bool vec4f::operator==(const vec4f rhs) const { return ((this->x == rhs.x) && (this->y == rhs.y) && (this->z == rhs.z) && (this->w == rhs.w)); } @@ -268,7 +268,7 @@ mat4f& mat4f::operator=(const mat4f rhs) return *this; } -bool mat4f::operator==(const mat4f rhs) +bool mat4f::operator==(const mat4f rhs) const { bool ret = 1; int I;