Go Down

Topic: Setzten von 'L'/'UL' bei Berechnungen (Read 134 times) previous topic - next topic

sschultewolter

Mar 10, 2014, 10:14 pm Last Edit: Mar 11, 2014, 12:30 am by sschultewolter Reason: 1
Gelöst!
Code: [Select]
const int MAX_DURATION = 32000;
const int MIN_DURATION = 2000;
const int MIN_SPEED = 0;
const int MAX_SPEED = 15;

int duration = MAX_DURATION + (speed - MIN_SPEED) * (MIN_DURATION - MAX_DURATION) / (MAX_SPEED - MIN_SPEED);
static int lastDuration;
if (lastDuration != duration) {
lastDuration = duration;
printf("\n%i", duration);
}
Keinen technischen Support ├╝ber PN!

Go Up