@@ -16,7 +16,7 @@ namespace std::experimental::io2d {
1616 constexpr float dot (const point_2d& other) const noexcept ;
1717 float magnitude () const noexcept ;
1818 constexpr float magnitude_squared () const noexcept ;
19- float angular_direction () const noexcept ;
19+ float angular_direction (const point_2d& to ) const noexcept ;
2020 point_2d to_unit () const noexcept ;
2121 constexpr static point_2d zero () noexcept ;
2222
@@ -28,18 +28,19 @@ namespace std::experimental::io2d {
2828 constexpr point_2d& operator /=(float rhs) noexcept ;
2929 constexpr point_2d& operator /=(const point_2d& rhs) noexcept ;
3030 };
31- constexpr bool operator ==(const point_2d& lhs, const point_2d& rhs)
32- noexcept ;
33- constexpr bool operator !=(const point_2d& lhs, const point_2d& rhs)
34- noexcept ;
35- constexpr point_2d operator +(const point_2d& lhs) noexcept ;
36- constexpr point_2d operator +(const point_2d& lhs, const point_2d& rhs)
37- noexcept ;
38- constexpr point_2d operator -(const point_2d& lhs) noexcept ;
39- constexpr point_2d operator -(const point_2d& lhs, const point_2d& rhs)
40- noexcept ;
31+
32+ constexpr bool operator ==(const point_2d& lhs, const point_2d& rhs) noexcept ;
33+ constexpr bool operator !=(const point_2d& lhs, const point_2d& rhs) noexcept ;
34+ constexpr point_2d operator +(const point_2d& val) noexcept ;
35+ constexpr point_2d operator +(const point_2d& lhs, const point_2d& rhs) noexcept ;
36+ constexpr point_2d operator -(const point_2d& val) noexcept ;
37+ constexpr point_2d operator -(const point_2d& lhs, const point_2d& rhs) noexcept ;
4138 constexpr point_2d operator *(const point_2d& lhs, float rhs) noexcept ;
4239 constexpr point_2d operator *(float lhs, const point_2d& rhs) noexcept ;
40+ constexpr point_2d operator *(const point_2d& lhs, const point_2d& rhs) noexcept ;
41+ constexpr point_2d operator /(const point_2d& lhs, float rhs) noexcept ;
42+ constexpr point_2d operator /(float lhs, const point_2d& rhs) noexcept ;
43+ constexpr point_2d operator /(const point_2d& lhs, const point_2d& rhs) noexcept ;
4344
4445 class matrix_2d {
4546 public:
@@ -57,13 +58,14 @@ namespace std::experimental::io2d {
5758 float m22;
5859
5960 // \ref{\iotwod.\matrixtwod.staticfactories}, static factory functions:
60- constexpr static matrix_2d init_translate (const point_2d& value) noexcept ;
61- constexpr static matrix_2d init_scale (const point_2d& value) noexcept ;
62- static matrix_2d init_rotate (float radians) noexcept ;
63- static matrix_2d init_reflect (float radians) noexcept ;
64- constexpr static matrix_2d init_shear_x (float factor) noexcept ;
65- constexpr static matrix_2d init_shear_y (float factor) noexcept ;
66-
61+ constexpr static matrix_2d init_translate (point_2d value) noexcept ;
62+ constexpr static matrix_2d init_scale (point_2d value) noexcept ;
63+ static matrix_2d init_rotate (float radians) noexcept ;
64+ static matrix_2d init_rotate (float radians, point_2d origin) noexcept ;
65+ static matrix_2d init_reflect (float radians) noexcept ;
66+ constexpr static matrix_2d init_shear_x (float factor) noexcept ;
67+ constexpr static matrix_2d init_shear_y (float factor) noexcept ;
68+
6769 // \ref{\iotwod.\matrixtwod.modifiers}, modifiers:
6870 constexpr matrix_2d& translate (point_2d v) noexcept ;
6971 constexpr matrix_2d& scale (point_2d v) noexcept ;
@@ -85,20 +87,12 @@ namespace std::experimental::io2d {
8587 };
8688
8789 // \ref{\iotwod.\matrixtwod.ops}, matrix_2d non-member operators:
88- constexpr matrix_2d operator *(const matrix_2d& lhs, const matrix_2d& rhs)
89- noexcept ;
90- constexpr bool operator ==(const matrix_2d& lhs, const matrix_2d& rhs)
91- noexcept ;
92- constexpr bool operator !=(const matrix_2d& lhs, const matrix_2d& rhs)
93- noexcept ;
94- constexpr point_2d operator *(point_2d v, const matrix_2d& m)
95- noexcept ;
96- constexpr matrix_2d operator *(const matrix_2d& lhs, const matrix_2d& rhs)
97- noexcept ;
98- constexpr bool operator ==(const matrix_2d& lhs, const matrix_2d& rhs)
99- noexcept ;
100- constexpr bool operator !=(const matrix_2d& lhs, const matrix_2d& rhs)
101- noexcept ;
90+ constexpr matrix_2d operator *(const matrix_2d& lhs, const matrix_2d& rhs) noexcept ;
91+ constexpr bool operator ==(const matrix_2d& lhs, const matrix_2d& rhs) noexcept ;
92+ constexpr bool operator !=(const matrix_2d& lhs, const matrix_2d& rhs) noexcept ;
93+ constexpr point_2d operator *(point_2d v, const matrix_2d& m) noexcept ;
94+
95+ // constexpr matrix_2d operator*(const matrix_2d& lhs, const matrix_2d& rhs) noexcept;
10296
10397 }
10498}
0 commit comments