Lines Matching +full:- +full:m
2 * Copyright (c) 2021 - 2024 the ThorVG project. All rights reserved.
40 #define FLOAT_EPSILON 1.0e-06f //1.192092896e-07f
70 return tvg::zero(a - b); in equal()
85 void rotate(Matrix* m, float degree);
86 bool inverse(const Matrix* m, Matrix* out);
87 bool identity(const Matrix* m);
91 static inline bool rightAngle(const Matrix& m) in rightAngle() argument
93 auto radian = fabsf(tvg::atan2(m.e21, m.e11)); in rightAngle()
99 static inline bool skewed(const Matrix& m) in skewed() argument
101 return !tvg::zero(m.e21 + m.e12); in skewed()
105 static inline void identity(Matrix* m) in identity() argument
107 m->e11 = 1.0f; in identity()
108 m->e12 = 0.0f; in identity()
109 m->e13 = 0.0f; in identity()
110 m->e21 = 0.0f; in identity()
111 m->e22 = 1.0f; in identity()
112 m->e23 = 0.0f; in identity()
113 m->e31 = 0.0f; in identity()
114 m->e32 = 0.0f; in identity()
115 m->e33 = 1.0f; in identity()
119 static inline void scale(Matrix* m, float sx, float sy) in scale() argument
121 m->e11 *= sx; in scale()
122 m->e22 *= sy; in scale()
126 static inline void scaleR(Matrix* m, float x, float y) in scaleR() argument
129 m->e11 *= x; in scaleR()
130 m->e21 *= x; in scaleR()
133 m->e22 *= y; in scaleR()
134 m->e12 *= y; in scaleR()
139 static inline void translate(Matrix* m, float x, float y) in translate() argument
141 m->e13 += x; in translate()
142 m->e23 += y; in translate()
146 static inline void translateR(Matrix* m, float x, float y) in translateR() argument
149 m->e13 += (x * m->e11 + y * m->e12); in translateR()
150 m->e23 += (x * m->e21 + y * m->e22); in translateR()
166 static inline void log(const Matrix& m) in log() argument
168 …N", "Matrix: [%f %f %f] [%f %f %f] [%f %f %f]", m.e11, m.e12, m.e13, m.e21, m.e22, m.e23, m.e31, m… in log()
176 void operator*=(Point& pt, const Matrix& m);
177 Point operator*(const Point& pt, const Matrix& m);
182 return lhs.x * rhs.y - rhs.x * lhs.y; in cross()
194 auto x = b->x - a->x; in length()
195 auto y = b->y - a->y; in length()
197 if (x < 0) x = -x; in length()
198 if (y < 0) y = -y; in length()
222 static inline Point operator-(const Point& lhs, const Point& rhs)
224 return {lhs.x - rhs.x, lhs.y - rhs.y};
302 return static_cast<T>(start + (end - start) * t); in lerp()