Search Results for

    Show / Hide Table of Contents

    Class Half2

    Defines a two component vector, using half precision floating point coordinates.

    Inheritance
    System.Object
    Half2
    Implements
    System.IEquatable<Half2>
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public sealed class Half2 : ValueType, IEquatable<Half2>

    Constructors

    Half2(Half)

    Initializes a new instance of the Half2 structure.

    Declaration
    public Half2(Half value)
    Parameters
    Half value

    The value to set for both the X and Y components.

    Half2(Half, Half)

    Initializes a new instance of the Half2 structure.

    Declaration
    public Half2(Half x, Half y)
    Parameters
    Half x

    The X component.

    Half y

    The Y component.

    Half2(Single)

    Initializes a new instance of the Half2 structure.

    Declaration
    public Half2(float value)
    Parameters
    System.Single value

    The value to set for both the X and Y components.

    Half2(Single, Single)

    Initializes a new instance of the Half2 structure.

    Declaration
    public Half2(float x, float y)
    Parameters
    System.Single x

    The X component.

    System.Single y

    The Y component.

    Fields

    X

    Gets or sets the X component of the vector.

    Declaration
    public Half X
    Field Value
    Half

    The X component of the vector.

    Y

    Gets or sets the Y component of the vector.

    Declaration
    public Half Y
    Field Value
    Half

    The Y component of the vector.

    Methods

    Equals(Half2)

    Returns a value that indicates whether the current instance is equal to the specified object.

    Declaration
    public bool Equals(Half2 other)
    Parameters
    Half2 other

    Object to make the comparison with.

    Returns
    System.Boolean

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

    Equals(ref Half2, ref Half2)

    Determines whether the specified object instances are considered equal.

    Declaration
    public static bool Equals(ref Half2 value1, ref Half2 value2)
    Parameters
    Half2 value1

    Half2 value2

    Returns
    System.Boolean

    true if value1 is the same instance as value2 or if both are null references or if value1.Equals(value2) returns true; otherwise, false.

    Equals(Object)

    Returns a value that indicates whether the current instance is equal to a specified object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    System.Object obj

    Object to make the comparison with.

    Returns
    System.Boolean

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

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    System.Int32

    A 32-bit signed integer hash code.

    ToString()

    Returns a System.String that represents this instance.

    Declaration
    public override string ToString()
    Returns
    System.String

    A System.String that represents this instance.

    Operators

    Equality(Half2, Half2)

    Tests for equality between two objects.

    Declaration
    public static bool operator ==(Half2 left, Half2 right)
    Parameters
    Half2 left

    The first value to compare.

    Half2 right

    The second value to compare.

    Returns
    System.Boolean

    true if left has the same value as right; otherwise, false.

    Explicit(Float2 to Half2)

    Performs an explicit conversion from Float2 to Half3.

    Declaration
    public static explicit operator Half2(Float2 value)
    Parameters
    Float2 value

    The value.

    Returns
    Half2

    The result of the conversion.

    Explicit(Half2 to Float2)

    Performs an explicit conversion from Float2 to Half3.

    Declaration
    public static explicit operator Float2(Half2 value)
    Parameters
    Half2 value

    The value.

    Returns
    Float2

    The result of the conversion.

    Inequality(Half2, Half2)

    Tests for inequality between two objects.

    Declaration
    public static bool operator !=(Half2 left, Half2 right)
    Parameters
    Half2 left

    The first value to compare.

    Half2 right

    The second value to compare.

    Returns
    System.Boolean

    true if left has a different value than right; otherwise, false.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat