mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Core: Use Math namespace for constants
This commit is contained in:
@@ -71,12 +71,12 @@ void Transform2D::rotate(real_t p_angle) {
|
||||
|
||||
real_t Transform2D::get_skew() const {
|
||||
real_t det = determinant();
|
||||
return Math::acos(columns[0].normalized().dot(SIGN(det) * columns[1].normalized())) - (real_t)Math_PI * 0.5f;
|
||||
return Math::acos(columns[0].normalized().dot(SIGN(det) * columns[1].normalized())) - (real_t)Math::PI * 0.5f;
|
||||
}
|
||||
|
||||
void Transform2D::set_skew(real_t p_angle) {
|
||||
real_t det = determinant();
|
||||
columns[1] = SIGN(det) * columns[0].rotated(((real_t)Math_PI * 0.5f + p_angle)).normalized() * columns[1].length();
|
||||
columns[1] = SIGN(det) * columns[0].rotated(((real_t)Math::PI * 0.5f + p_angle)).normalized() * columns[1].length();
|
||||
}
|
||||
|
||||
real_t Transform2D::get_rotation() const {
|
||||
|
||||
Reference in New Issue
Block a user