# UiNumber class

Namespace: [Grasshopper2.UI](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
[IoId("00000000-ae61-4a68-ad31-356dbdee157f")]
[DebuggerDisplay("{ToStringFull(),nq}")]
public sealed class UiNumber : IComparable<UiNumber>, IEquatable<UiNumber>, IStorable
```

A number with controllable limits and decimal places. This type of number is not fast, do not use it for actual mathematics.

## Constructors

- [UiNumber](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/ctor.md): (3 overloads) Create a new limited number.

## Fields

- [MaxDecimals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/maxdecimals.md): (static) Maximum allowed number of decimals.
- [MinDecimals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/mindecimals.md): (static) Minimum allowed number of decimals.

## Properties

- [Decimals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/decimals.md): Gets the number of decimals this number supports.
- [Epsilon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/epsilon.md): Gets the epsilon for the current accuracy.
- [HasLowerLimit](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/haslowerlimit.md): Gets whether this number is considered to have a lower limit.
- [HasUpperLimit](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/hasupperlimit.md): Gets whether this number is considered to have an upper limit.
- [Lower](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/lower.md): Gets the lower limit for this number.
- [NormalisedValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/normalisedvalue.md): Gets the value as a normalised unit. This doesn't work too well if the number domain is _huge_.
- [One](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/one.md): (static) Gets an unlimited one value with two decimal places.
- [Range](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/range.md): Gets the limit range. Careful, if the number is not limited this value is probably just decimal.MaxValue.
- [Tick](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/tick.md): Gets the index of the tick for the current value.
- [Ticks](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/ticks.md): Gets the total amount of unique 'ticks' in the current range. This number may be larger than the actual accuracy the decimal type supports on the current range.
- [Upper](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/upper.md): Gets the upper limit for this number.
- [Value](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/value.md): Gets the value of this number.
- [Zero](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/zero.md): (static) Gets an unlimited zero value with two decimal places.

## Methods

- [CompareTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/compareto.md): Compare this number with another. Only the value is taken into consideration.
- [ComputeSensibleLimits](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/computesensiblelimits.md): (static) Compute sensible limits for a value.
- [Decrement](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/decrement.md): Decrement this number by the smallest possible amount.
- [DefaultEpsilon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/defaultepsilon.md): (static) Gets the epsilon for a given number of decimals.
- [Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/equals.md): (2 overloads) Determines whether the specified object is equal to the current object.
- [EqualsFull](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/equalsfull.md): Gets whether this number is equal to some other number. Value, limits and decimals are all taken into consideration.
- [FormatValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/formatvalue.md): Format a value using the current decimal pattern.
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/gethashcode.md): Serves as the default hash function.
- [Increment](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/increment.md): Increment this number by the smallest possible amount.
- [LimitValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/limitvalue.md): Constrain a value to the current lower and upper limits.
- [ProcessValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/processvalue.md): Process a value by both limiting and rounding it.
- [RoundValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/roundvalue.md): Process a value by rounding it.
- [Standard](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/standard.md): (static) Create a standard UiNumber with range (-10, 10) with optional overrides.
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/store.md): This method is called whenever the instance is required to serialize itself.
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/tostring.md): Returns a string that represents the current object.
- [ToStringFull](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/tostringfull.md): Returns a string that represents the current object.
- [TryParse](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/tryparse.md): (2 overloads, static) Try and parse a string as a UiNumber.
- [WithDecimals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/withdecimals.md): Change the decimal count of this UiNumber.
- [WithIndexedValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/withindexedvalue.md): Change the value of this number by specifying a new tick.
- [WithLimits](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/withlimits.md): Change the limits of this number.
- [WithNormalisedValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/withnormalisedvalue.md): Change the value of this number.
- [WithValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/withvalue.md): Change the value of this number.

## Operators

- [operator +](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/op-addition.md): (2 overloads, static) Add a decimal value to a number.
- [operator -](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.uinumber/op-subtraction.md): (2 overloads, static) Subtract a number from a decimal value.
