I'm trying to write a program that will do simple functions however I'm aware of the fact that calculating a float is slower than an calculating an integer.
1) What are some techniques for speeding up these functions? 2) These functions are currently in my void setup() however I'm looking for a way to implement them into the loop by possibly changing the variables using a "for loop". Any advice on how I can create a custom function?
Here is my code:
int potSize = 30; //Size of the pot before the Hero bets. int bet = 15; //Assume the Villain bets ____ amount int raiseTo = 90; //Assume the Hero raises, how much is it to call?
float potOdds = 0.00; potOdds = ((bet + potSize) / bet);
float reversePotOdds = 0.00; reversePotOdds = ((raiseTo + (2 * bet) + potSize) / raiseTo);