Quote:
Originally Posted by cad321
How might one go about doing this? Unfortunately my programming skills are lacking at best but I get the feeling it is fairly simple to do.
|
Code:
double max2(double a,b){ return (a>b)?a:b; }
double max5(double a,double b,double c,double d,double e){
return max2(max2(max2(a,b),max2(c,d)),e);
}
...
divisor=max5(leftFront,rightFront,leftRear,rightRear,1);
leftFront/=divisor;
rightFront/=divisor;
...