tidy-fix automàtic (sense naming)
This commit is contained in:
@@ -11,7 +11,7 @@ namespace scenes {
|
||||
y1_ = y1;
|
||||
duration_ms_ = std::max(0, duration_ms);
|
||||
elapsed_ms_ = 0;
|
||||
ease_ = ease ? ease : Easing::linear;
|
||||
ease_ = (ease != nullptr) ? ease : Easing::linear;
|
||||
cur_x_ = x0;
|
||||
cur_y_ = y0;
|
||||
}
|
||||
@@ -38,8 +38,10 @@ namespace scenes {
|
||||
cur_y_ = Easing::lerpInt(y0_, y1_, eased);
|
||||
}
|
||||
|
||||
float SpriteMover::progress() const {
|
||||
if (duration_ms_ <= 0) return 1.0f;
|
||||
auto SpriteMover::progress() const -> float {
|
||||
if (duration_ms_ <= 0) {
|
||||
return 1.0F;
|
||||
}
|
||||
return static_cast<float>(elapsed_ms_) / static_cast<float>(duration_ms_);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user