A
a52
Guest
Is the clamp function in GML inclusive or exclusive? (ie, can the value clamped equal the bounds, or must it stay just below or just above?)
In the documentation, it says that it clamps the input between the two bounds, which suggests it is exclusive in both bounds. However, later in the same page, it says that clamp prevents the value from falling below or going above the bounds, which suggest that it is inclusive in both bounds.
Furthermore, in most other programming languages I've used, these types of functions are usually lower-bound inclusive and higher-bound exclusive.
Which is it?
In the documentation, it says that it clamps the input between the two bounds, which suggests it is exclusive in both bounds. However, later in the same page, it says that clamp prevents the value from falling below or going above the bounds, which suggest that it is inclusive in both bounds.
Furthermore, in most other programming languages I've used, these types of functions are usually lower-bound inclusive and higher-bound exclusive.
Which is it?