**Inheritance:**
java.lang.Object, java.awt.geom.Dimension2D, [com.aspose.tex.Size2D](../../com.aspose.tex/size2d)

**All Implemented Interfaces:**
java.io.Serializable
```
public static class Size2D.Float extends Size2D implements Serializable
```

The `Float` class defines dimensions specified in float coordinates.
## Constructors

| Constructor | Description |
| --- | --- |
| [Float()](#Float--) | Creates the Size2D instance. |
| [Float(float width, float height)](#Float-float-float-) | Creates the Size2D instance. |
## Fields

| Field | Description |
| --- | --- |
| [width](#width) | The width of this `Size2D`. |
| [height](#height) | The height of this `Size2D`. |
## Methods

| Method | Description |
| --- | --- |
| [setSize(float w, float h)](#setSize-float-float-) | Sets the dimensions of this `Size2D` to the specified `float` values. |
| [setSize(double w, double h)](#setSize-double-double-) | \{@inheritDoc\} |
| [getWidth()](#getWidth--) | \{@inheritDoc\} |
| [getHeight()](#getHeight--) | \{@inheritDoc\} |
### Float() {#Float--}
```
public Float()
```


Creates the Size2D instance.

### Float(float width, float height) {#Float-float-float-}
```
public Float(float width, float height)
```


Creates the Size2D instance.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| width | float | The width. |
| height | float | The height. |

### width {#width}
```
public float width
```


The width of this `Size2D`.

### height {#height}
```
public float height
```


The height of this `Size2D`.

### setSize(float w, float h) {#setSize-float-float-}
```
public void setSize(float w, float h)
```


Sets the dimensions of this `Size2D` to the specified `float` values.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| w | float | The width of this `Size2D` |
| h | float | The height of this `Size2D` |

### setSize(double w, double h) {#setSize-double-double-}
```
public void setSize(double w, double h)
```




**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| w | double |  |
| h | double |  |

### getWidth() {#getWidth--}
```
public double getWidth()
```




**Returns:**
double
### getHeight() {#getHeight--}
```
public double getHeight()
```




**Returns:**
double
