You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Add constant to vector function parameters that don't actually modify their input.
Add more overloads of vector multiplication, required by templates to compile with float=64.
This commit is contained in:
@@ -102,7 +102,7 @@ Vector2 Vector2::round() const {
|
||||
return Vector2(Math::round(x), Math::round(y));
|
||||
}
|
||||
|
||||
Vector2 Vector2::rotated(real_t p_by) const {
|
||||
Vector2 Vector2::rotated(const real_t p_by) const {
|
||||
real_t sine = Math::sin(p_by);
|
||||
real_t cosi = Math::cos(p_by);
|
||||
return Vector2(
|
||||
@@ -145,7 +145,7 @@ Vector2 Vector2::limit_length(const real_t p_len) const {
|
||||
return v;
|
||||
}
|
||||
|
||||
Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_weight) const {
|
||||
Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, const real_t p_weight) const {
|
||||
Vector2 p0 = p_pre_a;
|
||||
Vector2 p1 = *this;
|
||||
Vector2 p2 = p_b;
|
||||
|
||||
Reference in New Issue
Block a user