GH_DigitNumber
Maintains and provides functionality for evaluating and modifying numbers as used in the GH_DigitScrollerBase control.
Inheritance Hierarchy
System.Object
Grasshopper.GUI.Base.GH_DigitNumber
Namespace: Grasshopper.GUI.Base
Assembly: Grasshopper (in Grasshopper.dll)
Syntax
public class GH_DigitNumber
The GH_DigitNumber type exposes the following members.
Constructors
Name
Description
Public Method
GH_DigitNumber(GH_DigitNumber)
Create an exact duplicate of another GH_DigitNumber instance.
Public Method
GH_DigitNumber(Int32)
Create a new GH_DigitNumber instance with the specified number of decimal places.
Public Method
GH_DigitNumber(Int32, Int32)
Create a new GH_DigitNumber instance with the specified number of decimal places and a given radix position.
Properties
Name
Description
Public Property
DigitCount
Gets or sets the amount of digits in this number.
Public Property
Epsilon
Gets the smallest possible change.
Public Property
IsPrimaryDigitSignificant
Gets whether the primary digit at the given index is significant.
Public Property
IsSecondaryDigitSignificant
Gets whether the secondary digit at the given index is significant.
Public Property
Maximum
Gets the maximum value allowed in this number.
Public Property
Minimum
Gets the minimum value allowed in this number.
Public Property
Offset
Gets the offset between the primary and secondary digits.
Public Property
PrimaryDigits
Gets the internal list of primary digits. Do not modify this list.
Public Property
PrimaryPositive
Gets or sets a value indicating whether the number is positive.
Public Property
Radix
Gets or sets the radix point index. A negative radix index disables the radix point, zero is not a valid index.
Public Property
RadixIndex
Gets the mapped radix.
Public Property
SecondaryDigits
Gets the internal list of secondary digits. Do not modify this list.
Public Property
SecondaryPositive
Gets a value indicating whether the secondary number is positive.
Public Property
Value
Gets or sets the value of this number.
Methods
Name
Description
Public Method
AssignOffset
Assign an offset to a given digit and recursively adjust all leftwards offsets if needed.
Public Method
LimitValue
Limits the value to the minimum and maximum domain.
Public Method
Reset
Reset all parts to zero.
Public Method
Round
Round the number by cancelling the offset in the proper direction.
Public Method
ToString
(Overrides Object.ToString..)