None of the suggested functions in source code is very useful. By
placing them in separate functions, you only add a bunch of instructions
that takes un-necessary time, without making things much easier.
Instead of using "IF PBBetween(X, LVal, HVal)", it's much faster and
easier to use "IF (X > LVal) AND (X < HVal) THEN" directly in code.
Same with the others. Simply use the core functions directly in code.
Tip for optimization: When checking for range of values, put the most
probable case first. It's a flow, where code bounces out on first
"hit". In sample above, if X in most cases will be higher, put
(X < HVal) check first so it won't have to check lower range first.
Can save lots of time in huge loops..
------------------
placing them in separate functions, you only add a bunch of instructions
that takes un-necessary time, without making things much easier.
Instead of using "IF PBBetween(X, LVal, HVal)", it's much faster and
easier to use "IF (X > LVal) AND (X < HVal) THEN" directly in code.
Same with the others. Simply use the core functions directly in code.
Tip for optimization: When checking for range of values, put the most
probable case first. It's a flow, where code bounces out on first
"hit". In sample above, if X in most cases will be higher, put
(X < HVal) check first so it won't have to check lower range first.
Can save lots of time in huge loops..

------------------
Comment