![]() |
limit(value, min, max)
Make it a hard-coded function already regardless of how easy it is to script the function.
PHP Code:
|
I'd also like to see floor and ceil as run-time optimized functions.
And I've never seen this function in any other programming language, where'd you get it from? |
Quote:
Posted about floor and ceil in the code gallery a few months back: http://forums.graalonline.com/forums...ad.php?t=85605 |
Well I'm not entirely sure if limit is the right name for it but that's how I always thought of it.
I found it first in Zodiac's initial code by Yen, it looked something like this. PHP Code:
temp.donation = limit(temp.value, 0, player.rupees) Or other statistic related code. |
Quote:
|
floor==int() in graal, I'm not sure if ceil() is used often in algorithms?
|
Quote:
|
Quote:
|
Quote:
I had to fake ceil() in the most recent encryption algorithm I wrote (AES/Rijndael), and I've also had to fake it for things like Boyer-Moore string searching and some things for tree structures. |
| All times are GMT +2. The time now is 05:18 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.