summaryrefslogtreecommitdiffstats
path: root/core/color.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/color.h')
-rw-r--r--core/color.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/color.h b/core/color.h
index 0ff4fe6edd..9af8fb0a78 100644
--- a/core/color.h
+++ b/core/color.h
@@ -105,18 +105,18 @@ struct Color {
_FORCE_INLINE_ Color darkened(float p_amount) const {
Color res = *this;
- res.r = CLAMP(res.r * (1.0f - p_amount), 0.0, 1.0);
- res.g = CLAMP(res.g * (1.0f - p_amount), 0.0, 1.0);
- res.b = CLAMP(res.b * (1.0f - p_amount), 0.0, 1.0);
+ res.r = res.r * (1.0f - p_amount);
+ res.g = res.g * (1.0f - p_amount);
+ res.b = res.b * (1.0f - p_amount);
return res;
}
_FORCE_INLINE_ Color lightened(float p_amount) const {
Color res = *this;
- res.r = CLAMP(res.r + (1.0f - res.r) * p_amount, 0.0, 1.0);
- res.g = CLAMP(res.g + (1.0f - res.g) * p_amount, 0.0, 1.0);
- res.b = CLAMP(res.b + (1.0f - res.b) * p_amount, 0.0, 1.0);
+ res.r = res.r + (1.0f - res.r) * p_amount;
+ res.g = res.g + (1.0f - res.g) * p_amount;
+ res.b = res.b + (1.0f - res.b) * p_amount;
return res;
}