Skip to main content
Version: 1.0.0

Class QuantizeAngleAttribute

Namespace: ReadyM.Api.Multiplayer.Generators
Assembly: ReadyM.Api.Multiplayer.dll

Indicates a float field holding an angle in degrees as bits bits (8 or 16), splitting the full circle into 2^bits steps.

[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field)]
public sealed class QuantizeAngleAttribute : Attribute

Inheritance​

object ← Attribute ← QuantizeAngleAttribute

Inherited Members​

Attribute.GetCustomAttributes(MemberInfo, Type), Attribute.GetCustomAttributes(MemberInfo, Type, bool), Attribute.GetCustomAttributes(MemberInfo), Attribute.GetCustomAttributes(MemberInfo, bool), Attribute.IsDefined(MemberInfo, Type), Attribute.IsDefined(MemberInfo, Type, bool), Attribute.GetCustomAttribute(MemberInfo, Type), Attribute.GetCustomAttribute(MemberInfo, Type, bool), Attribute.GetCustomAttributes(ParameterInfo), Attribute.GetCustomAttributes(ParameterInfo, Type), Attribute.GetCustomAttributes(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(ParameterInfo, bool), Attribute.IsDefined(ParameterInfo, Type), Attribute.IsDefined(ParameterInfo, Type, bool), Attribute.GetCustomAttribute(ParameterInfo, Type), Attribute.GetCustomAttribute(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(Module, Type), Attribute.GetCustomAttributes(Module), Attribute.GetCustomAttributes(Module, bool), Attribute.GetCustomAttributes(Module, Type, bool), Attribute.IsDefined(Module, Type), Attribute.IsDefined(Module, Type, bool), Attribute.GetCustomAttribute(Module, Type), Attribute.GetCustomAttribute(Module, Type, bool), Attribute.GetCustomAttributes(Assembly, Type), Attribute.GetCustomAttributes(Assembly, Type, bool), Attribute.GetCustomAttributes(Assembly), Attribute.GetCustomAttributes(Assembly, bool), Attribute.IsDefined(Assembly, Type), Attribute.IsDefined(Assembly, Type, bool), Attribute.GetCustomAttribute(Assembly, Type), Attribute.GetCustomAttribute(Assembly, Type, bool), Attribute.Equals(object?), Attribute.GetHashCode(), Attribute.Match(object?), Attribute.IsDefaultAttribute(), Attribute.TypeId, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks​

The angle wraps around the circle: 190 arrives as -170. The receiver always gets a value in [-180, 180). With 16 bits a step is about 0.0055 degrees, with 8 bits about 1.4 degrees. A change is sent only when it crosses into another step and turns more than 0.1 degrees, the cutoff plain fields use.

Constructors​

QuantizeAngleAttribute(int)​

Indicates a float field holding an angle in degrees as bits bits (8 or 16), splitting the full circle into 2^bits steps.

public QuantizeAngleAttribute(int bits)

Parameters​

bits int

Remarks​

The angle wraps around the circle: 190 arrives as -170. The receiver always gets a value in [-180, 180). With 16 bits a step is about 0.0055 degrees, with 8 bits about 1.4 degrees. A change is sent only when it crosses into another step and turns more than 0.1 degrees, the cutoff plain fields use.

Properties​

Bits​

public int Bits { get; }

Property Value​

int