summaryrefslogtreecommitdiff
path: root/core/math/transform_2d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-01 01:32:07 +0100
committerGitHub <noreply@github.com>2022-03-01 01:32:07 +0100
commitde9446186dd00027921affc4183f19ab1c224322 (patch)
tree89916d57c088a6a34527713cf69934c4ff2d83af /core/math/transform_2d.cpp
parent9458a8f74254f1fe7f227ab92fbc3b8c9cbaa64a (diff)
parent1485924a2b90d15949fe544097ce8d00d527e9e7 (diff)
Merge pull request #58488 from lawnjelly/float_literals_casts
Diffstat (limited to 'core/math/transform_2d.cpp')
-rw-r--r--core/math/transform_2d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/transform_2d.cpp b/core/math/transform_2d.cpp
index 55c1f06ff5..71953e4130 100644
--- a/core/math/transform_2d.cpp
+++ b/core/math/transform_2d.cpp
@@ -71,12 +71,12 @@ void Transform2D::rotate(const real_t p_phi) {
real_t Transform2D::get_skew() const {
real_t det = basis_determinant();
- return Math::acos(elements[0].normalized().dot(SIGN(det) * elements[1].normalized())) - Math_PI * 0.5f;
+ return Math::acos(elements[0].normalized().dot(SIGN(det) * elements[1].normalized())) - (real_t)Math_PI * 0.5f;
}
void Transform2D::set_skew(const real_t p_angle) {
real_t det = basis_determinant();
- elements[1] = SIGN(det) * elements[0].rotated((Math_PI * 0.5f + p_angle)).normalized() * elements[1].length();
+ elements[1] = SIGN(det) * elements[0].rotated(((real_t)Math_PI * 0.5f + p_angle)).normalized() * elements[1].length();
}
real_t Transform2D::get_rotation() const {