Raised This Month: $ Target: $400
 0% 

Some info about min() and max()


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 07-27-2014 , 08:37   Re: Some info about min() and max()
Reply With Quote #3

Understood it. I made this thread, because I wanted to understand if I can use these natives as one-side clamp() function. The answer is yes. Thanks for the info!
What can I explain shortly:
You can use max() to make a border, which a value can't go lower. Like if you want your value to not get under the zero, you make it like:
PHP Code:
max(MyValue0
The opposite applies to min(). Your value won't go above the value in this native:
PHP Code:
min(MyValue0
In this way, your value will never be possitive.
Thanks for the info!
__________________

Last edited by Flick3rR; 07-27-2014 at 08:45.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode