aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/math/math_2d.cpp2
-rw-r--r--core/variant.cpp14
2 files changed, 4 insertions, 12 deletions
diff --git a/core/math/math_2d.cpp b/core/math/math_2d.cpp
index 2cc11aa73..e616f0591 100644
--- a/core/math/math_2d.cpp
+++ b/core/math/math_2d.cpp
@@ -424,7 +424,7 @@ Matrix32 Matrix32::inverse() const {
void Matrix32::affine_invert() {
- float det = elements[0][0]*elements[1][1] - elements[1][0]*elements[0][1];
+ float det = basis_determinant();
ERR_FAIL_COND(det==0);
float idet = 1.0 / det;
diff --git a/core/variant.cpp b/core/variant.cpp
index a78c07d81..b2afc9d08 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -429,6 +429,7 @@ bool Variant::can_convert(Variant::Type p_type_from,Variant::Type p_type_to) {
return true;
i++;
}
+
} else if (invalid_types) {
@@ -439,6 +440,8 @@ bool Variant::can_convert(Variant::Type p_type_from,Variant::Type p_type_to) {
return false;
i++;
}
+
+ return true;
}
return false;
@@ -457,7 +460,6 @@ bool Variant::can_convert_strict(Variant::Type p_type_from,Variant::Type p_type_
};
const Type *valid_types=NULL;
- const Type *invalid_types=NULL;
switch(p_type_to) {
case BOOL: {
@@ -679,16 +681,6 @@ bool Variant::can_convert_strict(Variant::Type p_type_from,Variant::Type p_type_
return true;
i++;
}
- } else if (invalid_types) {
-
-
- int i=0;
- while(invalid_types[i]!=NIL) {
-
- if (p_type_from==invalid_types[i])
- return false;
- i++;
- }
}
return false;