Struct Alpha8
- Namespace
- Microsoft.Xna.Framework.Graphics.PackedVector
- Assembly
- MonoGame.Framework.dll
Packed vector type containing a single 8 bit normalized W values that is ranging from 0 to 1.
public struct Alpha8 : IPackedVector<byte>, IPackedVector, IEquatable<Alpha8>
- Implements
- Inherited Members
Constructors
Alpha8(float)
Initializes a new instance of this structure.
public Alpha8(float alpha)
Parameters
alphafloatThe initial value for this structure.
Properties
PackedValue
Directly gets or sets the packed representation of the value.
public byte PackedValue { get; set; }
Property Value
Methods
Equals(Alpha8)
public bool Equals(Alpha8 other)
Parameters
otherAlpha8
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToAlpha()
Expands the packed representation to a System.Single
public float ToAlpha()
Returns
- float
The expanded value.
ToString()
public override string ToString()
Returns
ToVector4()
Expands the packed representation into a Vector4.
public Vector4 ToVector4()
Returns
Operators
operator ==(Alpha8, Alpha8)
Returns a value that indicates whether the two values are equal.
public static bool operator ==(Alpha8 lhs, Alpha8 rhs)
Parameters
lhsAlpha8The value on the left of the equality operator.
rhsAlpha8The value on the right of the equality operator.
Returns
- bool
true if the two values are equal; otherwise, false.
operator !=(Alpha8, Alpha8)
Returns a value that indicates whether the two value are not equal.
public static bool operator !=(Alpha8 lhs, Alpha8 rhs)
Parameters
lhsAlpha8The value on the left of the inequality operator.
rhsAlpha8The value on the right of the inequality operator.
Returns
- bool
true if the two value are not equal; otherwise, false.