Closed
Bug 1169427
Opened 9 years ago
Closed 9 years ago
Android M removes FloatMath
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox41 fixed)
RESOLVED
FIXED
Firefox 41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: snorp, Assigned: sebastian)
References
Details
Attachments
(1 file)
java.lang.Math has the same stuff, apparently, so we should just use that instead.
Android Lint also has the following output: `Use java.lang.Math#floor instead of android.util.FloatMath#floor() since it is faster as of API 8`
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Bug 1169427 - Replace FloatMath.*() calls with calls to Math.*(). r?snorp
Assignee | ||
Comment 3•9 years ago
|
||
This patch has been pretty much straight-forward, except for maybe DisplayPortCalculator where I had to explicitly cast from double to float. This is my guinea pig bug to try the review board. ;)
Assignee | ||
Updated•9 years ago
|
Attachment #8614741 -
Flags: review?(snorp)
Reporter | ||
Updated•9 years ago
|
Attachment #8614741 -
Flags: review?(snorp) → review+
Reporter | ||
Comment 4•9 years ago
|
||
Comment on attachment 8614741 [details] MozReview Request: Bug 1169427 - Replace FloatMath.*() calls with calls to Math.*(). r?snorp https://reviewboard.mozilla.org/r/10023/#review8811 Looks ok modulo these few things ::: mobile/android/base/gfx/JavaPanZoomController.java:667 (Diff revision 1) > - private float panDistance(MotionEvent move) { > + private double panDistance(MotionEvent move) { We use float everywhere, so let's just cast the return value instead ::: mobile/android/base/gfx/JavaPanZoomController.java:800 (Diff revision 1) > - private float getVelocity() { > + private double getVelocity() { Same here ::: mobile/android/tests/browser/robocop/MotionEventHelper.java:135 (Diff revision 1) > - float distance = FloatMath.sqrt((dx * dx) + (dy * dy)); > + double distance = Math.sqrt((dx * dx) + (dy * dy)); Again, cast to float
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8614741 [details] MozReview Request: Bug 1169427 - Replace FloatMath.*() calls with calls to Math.*(). r?snorp Bug 1169427 - Replace FloatMath.*() calls with calls to Math.*(). r?snorp
Attachment #8614741 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Attachment #8614741 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/5c3da7a5e599
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Blocks: android-lint
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•