| ??? 03/28/08 00:44 Read: times |
#152638 - Scale and offset? Responding to: ???'s previous message |
Is this not just a matter of scale and offset?
Something like:
char scaleoffs(char val,char low,char high)
{
unsigned int scaled;
scaled = ((high-low) * val)>>8;
scaled += low;
return scaled;
}
|
| Topic | Author | Date |
| Hey function lovers....how would you handle this? | 01/01/70 00:00 | |
| Scale and offset? | 01/01/70 00:00 | |
| kinda.....but dependant | 01/01/70 00:00 | |
| I'm not sure of what you want.. | 01/01/70 00:00 | |
| Ah....clarity | 01/01/70 00:00 | |
| Nitpicking | 01/01/70 00:00 | |
| Yes, but whats a .1 among friends? | 01/01/70 00:00 | |
| Overlap | 01/01/70 00:00 | |
| The overlap is proper | 01/01/70 00:00 | |
| RE: not sure why one would do that | 01/01/70 00:00 | |
| in the example give | 01/01/70 00:00 | |
| Now I understand! | 01/01/70 00:00 | |
| Like this | 01/01/70 00:00 | |
Wow Russ....very nice piece of code there | 01/01/70 00:00 |



