Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    Size2F Struct

    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>
    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 !=.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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

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


    Equals(Object)

    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    ToString()

    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()
    | Improve this Doc View Source

    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.


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation