Struct NormalizedShort2
- Namespace
- Microsoft.Xna.Framework.Graphics.PackedVector
- Assembly
- MonoGame.Framework.dll
Packed vector type containing two 16-bit signed normalized values, ranging from −1 to 1.
public struct NormalizedShort2 : IPackedVector<uint>, IPackedVector, IEquatable<NormalizedShort2>
- Implements
- Inherited Members
Constructors
NormalizedShort2(Vector2)
Initializes a new instance of this structure.
public NormalizedShort2(Vector2 vector)
Parameters
NormalizedShort2(float, float)
Initializes a new instance of this structure.
public NormalizedShort2(float x, float y)
Parameters
xfloatThe initial x-component value for this structure.
yfloatThe initial y-component value for this structure.
Properties
PackedValue
Directly gets or sets the packed representation of the value.
public uint PackedValue { get; set; }
Property Value
Methods
Equals(NormalizedShort2)
public bool Equals(NormalizedShort2 other)
Parameters
otherNormalizedShort2
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
ToVector2()
Expands the packed representation to a Vector2.
public Vector2 ToVector2()
Returns
- Vector2
The expanded value.
ToVector4()
Expands the packed representation into a Vector4.
public Vector4 ToVector4()
Returns
Operators
operator ==(NormalizedShort2, NormalizedShort2)
Returns a value that indicates whether the two values are equal.
public static bool operator ==(NormalizedShort2 a, NormalizedShort2 b)
Parameters
aNormalizedShort2The value on the left of the equality operator.
bNormalizedShort2The value on the right of the equality operator.
Returns
- bool
true if the two values are equal; otherwise, false.
operator !=(NormalizedShort2, NormalizedShort2)
Returns a value that indicates whether the two value are not equal.
public static bool operator !=(NormalizedShort2 a, NormalizedShort2 b)
Parameters
aNormalizedShort2The value on the left of the inequality operator.
bNormalizedShort2The value on the right of the inequality operator.
Returns
- bool
true if the two value are not equal; otherwise, false.