1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Make is_equal_approx separate for structures

This commit adds exposed behavior for C#
This commit is contained in:
Aaron Franke
2019-10-14 16:33:45 -04:00
parent 1fed266bf5
commit 86922ff70b
31 changed files with 118 additions and 16 deletions

View File

@@ -147,6 +147,7 @@ void Transform2D::orthonormalize() {
elements[0] = x;
elements[1] = y;
}
Transform2D Transform2D::orthonormalized() const {
Transform2D on = *this;
@@ -154,6 +155,11 @@ Transform2D Transform2D::orthonormalized() const {
return on;
}
bool Transform2D::is_equal_approx(const Transform2D &p_transform) const {
return elements[0].is_equal_approx(p_transform.elements[0]) && elements[1].is_equal_approx(p_transform.elements[1]) && elements[2].is_equal_approx(p_transform.elements[2]);
}
bool Transform2D::operator==(const Transform2D &p_transform) const {
for (int i = 0; i < 3; i++) {