MathStringFormatAsFraction Method (Double) |
Formats a number as a fraction for inch measurements, with denominator as power of 2 (up to maximum of 128).
Return a fraction, or number and fraction (e.g. 3 5/8), or decimal number if the input is not
a power of 2 fraction (within 0.0000001)
Namespace:
Autodesk.iLogic.Runtime
Assembly:
Autodesk.iLogic.Runtime (in Autodesk.iLogic.Runtime.dll) Version: 23.0
Syntax Public Shared Function FormatAsFraction (
rVal As Double
) As String
public static string FormatAsFraction(
double rVal
)
Parameters
- rVal
- Type: SystemDouble
The number.
Return Value
Type:
StringEither a fractional string (e.g. 3 5/8) or a decimal string (with up to 3 digits to the right of the decimal separator).
See Also