Size2F Struct
Namespace: Stride.Core.MathematicsAssembly: Stride.Core.Mathematics.dll
Defines a 2D rectangular size (width,height).
[DataContract("Size2F")]
[DataStyle(DataStyle.Compact)]
public struct Size2F : IEquatable<Size2F>
| Name | Description | |
|---|---|---|
| Constructors | ||
| Size2F(Single, Single) | Initializes a new instance of the Size2F struct. |
|
| Fields | ||
| Empty | A zero size with (width, height) = (0,0) |
|
| Height | Height. |
|
| Width | Width. |
|
| Zero | A zero size with (width, height) = (0,0) |
|
| Methods | ||
| Equals(Size2F) | Determines whether the specified System.Object is equal to this instance. |
|
| Equals(Object) | ||
| GetHashCode() | ||
| ToString() | ||
| Operators | ||
| Equality(Size2F, Size2F) | Implements the operator ==. |
|
| Inequality(Size2F, Size2F) | Implements the operator !=. |
|
Constructors
Size2F(Single, Single)
Initializes a new instance of the Size2F struct.
public Size2F(float width, float height)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | width | The x. |
| System.Single | height | The y. |
Fields
Empty
A zero size with (width, height) = (0,0)
public static readonly Size2F Empty
Field Value
| Type | Description |
|---|---|
| Size2F |
Height
Height.
[DataMember(1)]
public float Height
Field Value
| Type | Description |
|---|---|
| System.Single |
Width
Width.
[DataMember(0)]
public float Width
Field Value
| Type | Description |
|---|---|
| System.Single |
Zero
A zero size with (width, height) = (0,0)
public static readonly Size2F Zero
Field Value
| Type | Description |
|---|---|
| Size2F |
Methods
Equals(Size2F)
Determines whether the specified System.Object is equal to this instance.
public bool Equals(Size2F other)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2F | other | The System.Object to compare with this instance. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Equals(Object)
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
GetHashCode()
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 |
Overrides
ToString()
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
Operators
Equality(Size2F, Size2F)
Implements the operator ==.
public static bool operator ==(Size2F left, Size2F right)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2F | left | The left. |
| Size2F | right | The right. |
Returns
| Type | Description |
|---|---|
| System.Boolean | The result of the operator. |
Inequality(Size2F, Size2F)
Implements the operator !=.
public static bool operator !=(Size2F left, Size2F right)
Parameters
| Type | Name | Description |
|---|---|---|
| Size2F | left | The left. |
| Size2F | right | The right. |
Returns
| Type | Description |
|---|---|
| System.Boolean | The result of the operator. |