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:
parent
966559c3bd
commit
a8d12b5a61
7 changed files with 97 additions and 73 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue