-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8345261: Refactor the Dimension2D classes #1653
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,18 +26,6 @@ | |
package com.sun.javafx.geom; | ||
|
||
/** | ||
* The <code>Dimension2D</code> class is to encapsulate a width | ||
* and a height dimension. | ||
* <p> | ||
* A 2D dimension object that contains a width and a height. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe mention that this class uses |
||
*/ | ||
public class Dimension2D { | ||
public float width; | ||
public float height; | ||
|
||
public Dimension2D() { } | ||
|
||
public Dimension2D(float w, float h) { | ||
width = w; | ||
height = h; | ||
} | ||
} | ||
public record Dimension2D(float width, float height) {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wish this class was named differently to signify it's based on float... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most of the classes in this package are based on floats. As this is an internal class, adding a comment seems sufficient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the largest positive integer that can be stored in a float exactly is ~16M. we are fine here.