Table of Contents

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

width float

The x.

height float

The y.

Fields

Empty

A zero size with (width, height) = (0,0)

public static readonly Size2F Empty

Field Value

Size2F

Height

Height.

[DataMember(1)]
public float Height

Field Value

float

Width

Width.

[DataMember(0)]
public float Width

Field Value

float

Zero

A zero size with (width, height) = (0,0)

public static readonly Size2F Zero

Field Value

Size2F

Methods

Deconstruct(out float, out float)

Deconstructs the vector's components into named variables.

public void Deconstruct(out float width, out float height)

Parameters

width float

The Width component

height float

The Height component

Equals(Size2F)

Determines whether the specified object is equal to this instance.

public bool Equals(Size2F other)

Parameters

other Size2F

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The 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

left Size2F

The left.

right Size2F

The right.

Returns

bool

The result of the operator.

operator !=(Size2F, Size2F)

Implements the operator !=.

public static bool operator !=(Size2F left, Size2F right)

Parameters

left Size2F

The left.

right Size2F

The right.

Returns

bool

The result of the operator.