Fixed clamping

pull/16/head
Ishaan Bhardwaj 2021-03-04 18:44:30 -05:00 committed by GitHub
parent 57518dc299
commit e7bb44deb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -87,6 +87,6 @@ function table.contains(table, element)
return false
end
function clamp(a, b, c)
return math.min(a, math.max(b, c))
end
function clamp(x, min, max)
return (x < min and min or (x > max and max or x))
end