Package org.jvision.geometry
Class Dimension2Dd
java.lang.Object
org.jvision.geometry.Dimension2Dd
An implementation of
Dimension2D that enables to be constructed with double values.- Since:
- 1.0.0
- Version:
- "1.0.0" b202104211400L
- Author:
- Julien Seinturier - JOrigin - contact@jorigin.org - https://github.com/jorigin/jvision
-
Constructor Summary
ConstructorsConstructorDescriptionDimension2Dd(double width, double height)Construct a new dimension with given width and height. -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the height of this dimension.doublegetWidth()Get the width of this dimension.voidsetSize(double width, double height)Set the size of this dimension.toString()Returns a string representation of the values of thisDimension2Dobject'sheightandwidthfields.
-
Constructor Details
-
Dimension2Dd
public Dimension2Dd(double width, double height)Construct a new dimension with given width and height.- Parameters:
width- the width value.height- the height value.
-
-
Method Details
-
getWidth
public double getWidth()Get the width of this dimension.- Returns:
- the width of this dimension
- See Also:
getHeight()
-
getHeight
public double getHeight()Get the height of this dimension.- Returns:
- the height of this dimension
- See Also:
getWidth()
-
setSize
public void setSize(double width, double height)Set the size of this dimension.- Parameters:
width- the width of this dimensionheight- the height of this dimension
-
toString
Returns a string representation of the values of thisDimension2Dobject'sheightandwidthfields. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not benull.
-