Team-Silver-Sphere / SquadJS

Squad Server Script Framework
Boost Software License 1.0
163 stars 123 forks source link

Clamp the value between 0 and 1 to avoid tinygradient errors. #343

Closed mxrcode closed 7 months ago

mxrcode commented 7 months ago

Previously, we could get a coefficient greater than 1, causing SquadJS to crash. One case is described here. Now we clamp the ratio between 0 and 1, which prevents an error related to tinygradient