This question was
closed Jun 27, 2016 at 04:51 AM by
n931009 for the following reason:
Problem is not reproducible or outdated
Question by
n931009 · Jun 21, 2016 at 02:50 AM ·
mathvaluecalculationsround
Can't seem to round to 2 DP
I am making a slot machine game and the winning point should be in 2 decimal places to symbolize money, i tried both System.Math and Mathf.Round but none of them seems to work. Are there any other ways that will work? Here's my code:
linesInfo.lineInfo[a].winningValue = System.Math.Round((iconInfo[payoutIcon.ID].xTwo * betAmounts[currentBet] / lineCount) * 100) / 100;
Comment
Follow this Question
Related Questions
How to calculate vector perpendicular to a direction vector? 2 Answers
Getting average value of slider while playing. 0 Answers
Maths question - normalization I think 1 Answer
Find border of Matrix (east, west, north, south) 0 Answers
Radius too long 1 Answer