summaryrefslogtreecommitdiffstats
path: root/scene/gui/texture_progress_bar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/texture_progress_bar.cpp')
-rw-r--r--scene/gui/texture_progress_bar.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/gui/texture_progress_bar.cpp b/scene/gui/texture_progress_bar.cpp
index 248260a7d2..5261cbe3eb 100644
--- a/scene/gui/texture_progress_bar.cpp
+++ b/scene/gui/texture_progress_bar.cpp
@@ -249,8 +249,7 @@ Point2 TextureProgressBar::get_relative_center() {
p += rad_center_off;
p.x /= progress->get_width();
p.y /= progress->get_height();
- p.x = CLAMP(p.x, 0, 1);
- p.y = CLAMP(p.y, 0, 1);
+ p = p.clamp(Point2(), Point2(1, 1));
return p;
}