View Single Post
  #3   Spotlight this post!  
Unread 14-02-2005, 18:53
the_undefined's Avatar
the_undefined the_undefined is offline
German FES
AKA: Felix Geisendörfer
#1648 (Gearbox Gangstas)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Germany
Posts: 77
the_undefined has a spectacular aura aboutthe_undefined has a spectacular aura about
Re: Problems with NullZone

Quote:
Originally Posted by AIBob
In your code you may not be typecasting enough, when you are subtracting the two unsigned characters there may be some problems in that code, try this:

unsigned char eNum = (unsigned char) ((( (signed int)sNum - (signed int)sMin ) * ( (signed int)eMax - (signed int)eMin )) / ( (signed int)sMax - (signed int)sMin ) + (signed int)eMin);
Ok I'll try that tomorrow, thanks for your help ... C Typecasting makes me just crazy ^^, I'll be so happy when I'll finish our Teams Homepage in PHP after Shipping Date you can't imagine : ) ...