Team-Silver-Sphere / SquadJS

Squad Server Script Framework
Boost Software License 1.0
167 stars 127 forks source link

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

Closed mxrcode closed 9 months ago

mxrcode commented 10 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