Struct UnsignedDivisionMagic
A collection of magic constants that can be used to perform unsigned integer division by constant.
Inherited Members
Namespace: Flame.Constants
Assembly: Flame.dll
Syntax
public struct UnsignedDivisionMagic
Constructors
| Edit this page View SourceUnsignedDivisionMagic(IntegerConstant, int, bool)
Collects unsigned division magic constants.
Declaration
public UnsignedDivisionMagic(IntegerConstant multiplier, int shiftAmount, bool useAdd)
Parameters
| Type | Name | Description |
|---|---|---|
| IntegerConstant | multiplier | A constant factor to multiply by. |
| int | shiftAmount | An amount of bits to shift. |
| bool | useAdd | A Boolean flag that tells if an addition should be used. |
Properties
| Edit this page View SourceMultiplier
Gets the constant factor to multiply by.
Declaration
public readonly IntegerConstant Multiplier { get; }
Property Value
| Type | Description |
|---|---|
| IntegerConstant | The constant factor to multiply by. |
ShiftAmount
Gets the number of bits to shift.
Declaration
public readonly int ShiftAmount { get; }
Property Value
| Type | Description |
|---|---|
| int | The number of bits to shift. |
UseAdd
Gets a Boolean flag that tells if an add-operation should be used.
Declaration
public readonly bool UseAdd { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|