Ok last question
I have read all over about floating points and I still can't figure out how to do this.
My calculation is
shotspersecond = count / seconds
shotsperminute = shotspersecond * 60
with floating points this would work fine and tell me shots per minute avg.
Without FP if the seconds > count then I get 0 as shotspersecond and a number of other problems.
I know this can't be too hard but I can't seem to wrap my brain around it.
Any help would be very appriciated as once I get this I should be able to finish off my project.
Any help would be very appriciated as once I get this I should be able to finish off my project.
This is what I have so far... It may be accurate enough for what I am doing.
SPS = 5 / TotalTime
if sps = 0 then
SPS = 5 // TotalTime
SPM = sps * 60 / 100
else
SPM = SPS * 60
endif
Better way to do it?





Bookmarks