|
-
Apr 20th, 2000, 01:06 AM
#1
Thread Starter
Addicted Member
Hello!
I have a function which returns a value between -192 and 479 (from 32-224 to 255+224). I need the app to if the value is over 255 reduce it by 224, and if it is under 32 add 224.
That is: v>255 Then v = v-224
v<32 Then v = v+224
The problem is, when doing this with ordinary If-Then-Else, it takes to much time if you loop it a million times. Is there a way to keep the value between the boundaries?
I tried to declare it as byte, but when coming over or under it generated an overflow error.
Please, help me!
Pentax
PS.
By the way, Heppy Easter, everyone!
Wilhelm Tunemyr,
Swede in London
[email protected]
"Dort, wo man Bücher verbrennt, verbrennt man am Ende auch Menschen"
Heinrich Heine (1797-1856)
Pravda vítezi!
(Truth prevails!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|