Skip to main content

Class FloatPackAttribute

Packs a float field, clamped from -max to +max, with Also See: Bit Packing Documentation

Inheritance
System.Object
System.Attribute
Inherited Members
Show
Syntax
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter)]
public class FloatPackAttribute : Attribute, _Attribute

Constructors

FloatPackAttribute(Single, Single)

Declaration
public FloatPackAttribute(float max, float precision)
Parameters
TypeNameDescription
System.SinglemaxMax value of the float
System.SingleprecisionSmallest possible value of the field. Real precision will be calculated using bitcount but will always be lower than this parameter

FloatPackAttribute(Single, Int32)

Declaration
public FloatPackAttribute(float max, int bitCount)
Parameters
TypeNameDescription
System.SinglemaxMax value of the float
System.Int32bitCountnumber of bits to pack the field into