Transformations now commited step by step, fixes many transformation related bugs
This commit is contained in:
parent
b4babf978e
commit
a2e4a795f7
8 changed files with 127 additions and 47 deletions
|
|
@ -442,6 +442,8 @@ namespace FixedPoint {
|
|||
}
|
||||
|
||||
Multiplier operator*(const Multiplier& a) const {
|
||||
if(a.val == UnderlyingNumber(0))
|
||||
return Multiplier(0);
|
||||
return (*this) / Multiplier(a.val, !a.isReciprocal);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -269,3 +269,9 @@ template <typename T, int S> T transform_scalar(const Transform<T, 2, S>& transf
|
|||
template <typename T> std::array<Vector<T, 2>, 4> triangle_from_rect_points(const Vector<T, 2>& min, const Vector<T, 2>& max) {
|
||||
return {min, {min.x(), max.y()}, max, {max.x(), min.y()}};
|
||||
}
|
||||
|
||||
template <typename T> std::string vec_pretty(const Vector<T, 2>& a) {
|
||||
std::stringstream ss;
|
||||
ss << "[" << a.x() << ", " << a.y() << "]";
|
||||
return ss.str();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue