mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
This commit is contained in:
parent
03b13e0c69
commit
e956e80c1f
130 changed files with 967 additions and 511 deletions
|
@ -233,12 +233,14 @@ public:
|
|||
static _ALWAYS_INLINE_ float range_lerp(float p_value, float p_istart, float p_istop, float p_ostart, float p_ostop) { return Math::lerp(p_ostart, p_ostop, Math::inverse_lerp(p_istart, p_istop, p_value)); }
|
||||
|
||||
static _ALWAYS_INLINE_ double smoothstep(double p_from, double p_to, double p_weight) {
|
||||
if (is_equal_approx(p_from, p_to)) return p_from;
|
||||
if (is_equal_approx(p_from, p_to))
|
||||
return p_from;
|
||||
double x = CLAMP((p_weight - p_from) / (p_to - p_from), 0.0, 1.0);
|
||||
return x * x * (3.0 - 2.0 * x);
|
||||
}
|
||||
static _ALWAYS_INLINE_ float smoothstep(float p_from, float p_to, float p_weight) {
|
||||
if (is_equal_approx(p_from, p_to)) return p_from;
|
||||
if (is_equal_approx(p_from, p_to))
|
||||
return p_from;
|
||||
float x = CLAMP((p_weight - p_from) / (p_to - p_from), 0.0f, 1.0f);
|
||||
return x * x * (3.0f - 2.0f * x);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue