Clamping angles?

This doesn’t work because +180 and 180 are the same angle value, the same happens with 0 and 360. So 8 is clearly NOT in the interval because the interval is 0 degrees wide😅

This example really doesn’t make sense to me, this interval is 3 degrees wide (179, 180 and 181), so it will be clamped to the closest value to 8, 179 indeed. (try clamping a value bigger than 181 and less than 360 and it will return 181 because it’s the closest value)

This is the only correct example, because you are using an interval of 259.9 degrees, it would have worked even with 0 and 359.9 (but it doesn’t really make sense to clamp an angle to a 360 degrees interval, because 560 for example is already converted to 200 automatically if you input it in a rotator value).

7 Likes