Pages: [1]   Go Down
Author Topic: Setzten von 'L'/'UL' bei Berechnungen  (Read 116 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 35
Posts: 2422
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Gelöst!
Code:
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);
}
« Last Edit: March 10, 2014, 06:30:26 pm by sschultewolter » Logged

Keinen technischen Support über PN!
Hat dir meine Antwort gefallen, nicht sparsam mit dem Karma sein smiley-wink

Pages: [1]   Go Up
Jump to: