Vector2h Vector2h Struct

Definition

2-component Vector of the Half type. Occupies 4 Byte total.

[System.Serializable]
public struct Vector2h : IEquatable<OpenTK.Vector2h>, System.Runtime.Serialization.ISerializable
type Vector2h = struct
    interface ISerializable
Inheritance
Vector2hVector2h
Attributes
Implements

Constructors

Vector2h(Half) Vector2h(Half)
Vector2h(Vector2) Vector2h(Vector2)

The new Half2 instance will convert the Vector2 into 16-Bit Half precision floating point.

Vector2h(Vector2) Vector2h(Vector2)

The new Half2 instance will convert the Vector2 into 16-Bit Half precision floating point. This is the fastest constructor.

Vector2h(Vector2d) Vector2h(Vector2d)

The new Half2 instance will convert the Vector2d into 16-Bit Half precision floating point.

Vector2h(Vector2d) Vector2h(Vector2d)

The new Half2 instance will convert the Vector2d into 16-Bit Half precision floating point. This is the faster constructor.

Vector2h(Single) Vector2h(Single)
Vector2h(Half, Half) Vector2h(Half, Half)

The new Half2 instance will avoid conversion and copy directly from the Half parameters.

Vector2h(Vector2, Boolean) Vector2h(Vector2, Boolean)
Vector2h(Vector2, Boolean) Vector2h(Vector2, Boolean)
Vector2h(Vector2d, Boolean) Vector2h(Vector2d, Boolean)
Vector2h(Vector2d, Boolean) Vector2h(Vector2d, Boolean)
Vector2h(SerializationInfo, StreamingContext) Vector2h(SerializationInfo, StreamingContext)

Constructor used by ISerializable to deserialize the object.

Vector2h(Single, Single) Vector2h(Single, Single)

The new Half2 instance will convert the 2 parameters into 16-Bit Half precision floating point.

Vector2h(Single, Single, Boolean) Vector2h(Single, Single, Boolean)

The new Half2 instance will convert the 2 parameters into 16-Bit Half precision floating point.

Fields

SizeInBytes SizeInBytes

The size in bytes for an instance of the Half2 struct is 4.

X X

The X component of the Half2.

Y Y

The Y component of the Half2.

Methods

Equals(Vector2h) Equals(Vector2h)

Returns a value indicating whether this instance is equal to a specified OpenTK.Half2 vector.

FromBinaryStream(BinaryReader) FromBinaryStream(BinaryReader)

Updates the X and Y components of this instance by reading from a Stream.

FromBytes(Byte[], Int32) FromBytes(Byte[], Int32)
GetBytes(Vector2h) GetBytes(Vector2h)

Returns the Half2 as an array of bytes.

GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

Used by ISerialize to serialize the object.

ToBinaryStream(BinaryWriter) ToBinaryStream(BinaryWriter)

Writes the X and Y components of this instance into a Stream.

ToString() ToString()

Returns a string that contains this Half2's numbers in human-legible form.

ToVector2() ToVector2()
ToVector2d() ToVector2d()

Operators

Explicit(Vector2 to Vector2h) Explicit(Vector2 to Vector2h)
Explicit(Vector2d to Vector2h) Explicit(Vector2d to Vector2h)
Explicit(Vector2h to Vector2) Explicit(Vector2h to Vector2)
Explicit(Vector2h to Vector2d) Explicit(Vector2h to Vector2d)

Applies to