Tried in both Objective-C (Xcode) and Python (terminal) and (1/6)*(66.900009-62.852596) evaluates to zero both times. Anyone know why this is? Shouldn’t it be 0.26246?
Tried in both Objective-C (Xcode) and Python (terminal) and (1/6)*(66.900009-62.852596) evaluates to zero both
Share
You are doing integer arithmetic on
1/6, and the floor of1/6is0. Try1.0/6instead.