public class Dimension<NUMBER extends AbstractNumber = Double> extends Object
Represents a two-dimensional dimension with width and height.
size = Dimension<Double>(640.0, 480.0)
| Modifier and Type | Member | Description |
|---|---|---|
| public property | heightheight as NUMBER |
The height of the dimension. |
| public property | widthwidth as NUMBER |
The width of the dimension. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | DimensionDimension(width as NUMBER, height as NUMBER) |
Constructs a new Dimension with the specified width and height. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | areaarea() as NUMBER |
Calculates the area of the dimension. |
| public | perimeterperimeter() as NUMBER |
Calculates the perimeter of the dimension. |
| public | scalescale(factor as NUMBER) as Void |
Scales the dimension by the specified factor. |
| public override | toStringtoString() as String |
Returns a string representation of the dimension. |