# FloatingPointExtensionMethods class

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

```cs
public static class FloatingPointExtensionMethods
```

Extension methods for System.Double

## Methods

- [ArrayTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/arrayto.md): (3 overloads, static) Create an array from this number to another.
- [AsColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/ascolour.md): (static) Create a greyscale colour.
- [Average](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/average.md): (2 overloads, static) Compute the mean (average) of a collection of numbers. This method is designed to work with many numbers as well as very large numbers. Essentially, if you're certain that the sum of all values doesn't exceed 1e128, there are faster ways to compute the average.
- [Clip](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/clip.md): (6 overloads, static) Limit a number to a range.
- [DecimalPrecision](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/decimalprecision.md): (static) Gets the number of significant decimal places of a decimal number.
- [EnumerateTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/enumerateto.md): (static) Create an enumeration from one value to another.
- [FormatHonest](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/formathonest.md): (static) Format a double using a limited number of decimal places, appending an ellipsis whenever the displayed digits do not capture the exact value. The displayed digits are rounded, so 5.99999999993 formats as "6.0…" rather than "5.99999…".
- [FormatScientific](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/formatscientific.md): (2 overloads, static) Format a bigInteger value using scientific base-10 notation.
- [FractionalPart](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/fractionalpart.md): (static) Return the fractional portion of a double. This method does not suffer from the same rounding issues as f = x % 1 or f = x - floor(x). For example try taking an arithmetical approach to finding the fractional part of 100000000000000.1 and you'll get 0.09375 instead of 0.1
- [GetMagnitude](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/getmagnitude.md): (2 overloads, static) Gets both the magnitude of a number and the scaled value.
- [Highest](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/highest.md): (2 overloads, static) Gets the highest number in an array.
- [IntegralPart](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/integralpart.md): (static) Return the integral portion of a double. This is equivalent to Math.Truncate().
- [IsBetween](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/isbetween.md): (2 overloads, static) Gets whether the number is in between both limits. This method returns true even if the number is coincident with the limits.
- [IsInteger32](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/isinteger32.md): (static) Gets whether a double precision value is an exact integer in the 32-bit range.
- [IsInteger64](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/isinteger64.md): (static) Gets whether a double precision value is an exact integer in the 64-bit range.
- [Lowest](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/lowest.md): (2 overloads, static) Gets the lowest number in an array.
- [Map](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/map.md): (4 overloads, static) Map a value from one numeric domain to another.
- [Median](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/median.md): (2 overloads, static) Compute the median of a collection of numbers. This method uses the QuickMedian algorithm.
- [Next](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/next.md): (2 overloads, static) Gets the first double value that is larger than the current one.
- [NextEpsilon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/nextepsilon.md): (static) Gets the distance from this number to the next possible number.
- [NextOrderOfMagnitude](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/nextorderofmagnitude.md): (4 overloads, static) Gets the order of magnitude bigger than or equal to the given number. The value returned is equal to or bigger than number, where "bigger" means further away from zero. Ie. negative values will result in larger negative values.
- [NumbersBetween](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/numbersbetween.md): (static) Gets the number of steps between two values. This is one more than the amount of unique numbers in between a and b.
- [Prev](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/prev.md): (2 overloads, static) Gets the first double value that is smaller than the current one.
- [PrevEpsilon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/prevepsilon.md): (static) Gets the distance from this number to the previous possible number.
- [PrevOrderOfMagnitude](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/prevorderofmagnitude.md): (4 overloads, static) Gets the order of magnitude smaller than or equal to the given number. The value returned is equal to or smaller than number, where "smaller" means closer to zero. Ie. negative values will result in smaller negative values.
- [UniqueValuesBetween](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.floatingpointextensionmethods/uniquevaluesbetween.md): (static) Gets the total number of unique doubles between two values.
