Fix velocity reporting for negative values > -1
Currently, a velocity with a magnitude of (for example) 0.1 and a negative sign will be displayed as positive 0.1 by the FasterStringBuilder. This is because casting a float to an int makes it zero, and the sign gets lost: (int)-0.1f = 0. Add this sign here. Bug: 112705257 Test: enabled pointer location, and manually generated some flings that have negative direction and magnitude less than 1. Confirmed that the velocity sign is displayed correctly. Change-Id: I0d777e790d324739ce248d3e6b8e04692400d832
Loading
Please register or sign in to comment