linters
This commit is contained in:
@@ -82,7 +82,7 @@ void MovingPlatform::recalcSegmentLength() {
|
||||
|
||||
float dx = path_[to].x - path_[from].x;
|
||||
float dy = path_[to].y - path_[from].y;
|
||||
segment_length_ = std::sqrt(dx * dx + dy * dy);
|
||||
segment_length_ = std::sqrt((dx * dx) + (dy * dy));
|
||||
}
|
||||
|
||||
// Avanza al siguiente segmento
|
||||
@@ -174,8 +174,8 @@ void MovingPlatform::update(float delta_time) {
|
||||
int from = getSegmentFrom();
|
||||
int to = getSegmentTo();
|
||||
|
||||
float new_x = path_[from].x + (path_[to].x - path_[from].x) * t;
|
||||
float new_y = path_[from].y + (path_[to].y - path_[from].y) * t;
|
||||
float new_x = path_[from].x + ((path_[to].x - path_[from].x) * t);
|
||||
float new_y = path_[from].y + ((path_[to].y - path_[from].y) * t);
|
||||
sprite_->setPosX(new_x);
|
||||
sprite_->setPosY(new_y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user