#Is there a similar math function to math.clamp?

14 messages · Page 1 of 1 (latest)

desert fulcrum
#

for example, my number has the possibility of going below 0, but i want it to be above 0 with no limit. can i use math.clamp without setting a max number and only have the number be changed if it's less than 0?

safe caveBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

valid lagoon
safe caveBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

nimble urchin
safe caveBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

nimble urchin
#

if so use math.max(0, n)

safe caveBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

desert fulcrum
safe caveBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

outer crane
#

or math.clamp(x, 0, math.huge)

safe caveBOT
#

I can't compile LaTeX in this thread as I lack the SEND_MESSAGES permission in the origin channel (#1020374354867007528)! Please check my permissions and try again.

desert fulcrum