Struct Size2F
- Namespace
- Stride.Core.Mathematics
- Assembly
- Stride.Core.Mathematics.dll
Defines a 2D rectangular size (width,height).
[DataContract("Size2F")]
[DataStyle(DataStyle.Compact)]
public struct Size2F : IEquatable<Size2F>
- Implements
Constructors
Size2F(float, float)
Initializes a new instance of the Size2F struct.
public Size2F(float width, float height)
Parameters
Fields
Empty
A zero size with (width, height) = (0,0)
public static readonly Size2F Empty
Field Value
Height
Height.
[DataMember(1)]
public float Height
Field Value
Width
Width.
[DataMember(0)]
public float Width
Field Value
Zero
A zero size with (width, height) = (0,0)
public static readonly Size2F Zero
Field Value
Methods
Deconstruct(out float, out float)
Deconstructs the vector's components into named variables.
public void Deconstruct(out float width, out float height)
Parameters
Equals(Size2F)
Determines whether the specified object is equal to this instance.
public bool Equals(Size2F other)
Parameters
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(Size2F, Size2F)
Implements the operator ==.
public static bool operator ==(Size2F left, Size2F right)
Parameters
Returns
- bool
The result of the operator.
operator !=(Size2F, Size2F)
Implements the operator !=.
public static bool operator !=(Size2F left, Size2F right)
Parameters
Returns
- bool
The result of the operator.