[Solved] Why isn’t my math right
It is not clear why you expect this code to behave differently. Look at these lines: var ExchangeRate = c.GrabBTCAmount(); var AmountInBTC = (c.USDtoBTC(15000, ExchangeRate)); var AmountAtMarket = (AmountInBTC * ExchangeRate); If I inline USDtoBTC and inline everything to calculate AmountAtMarket the formula would be AmountAtMarket = (15000 / ExchangeRate) * ExchangeRate So you should … Read more