[help] How to clamp a variable?
2 posts • Page 1 of 1
[help] How to clamp a variable?
How would i go about clamping a variable? I want to clamp it so that it does not go past 0.4, and does not go under 0.10. Didn't see a clamp command in the Command/Variable list.
- vekenti
- Posts: 13
- Joined: Sun Jul 13, 2014 4:43 am
Re: [help] How to clamp a variable?
usage:
clamp(x, min, max)
example:
a = clamp(a+1, 0, 10)
clamp(x, min, max)
example:
a = clamp(a+1, 0, 10)
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 15 guests