|
SIToScaledString(Double, String, String, String, Int32, Double, Double) Method
|
Turns the given number of units into a textual representation with an appropriate unit scaling
given string array of factor names or symbols.
Namespace: GSF.UnitsAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax Public Shared Function ToScaledString (
totalUnits As Double,
format As String,
unitName As String,
symbolNames As String(),
Optional decimalPlaces As Integer = -1,
Optional minimumFactor As Double = 1E-24,
Optional maximumFactor As Double = 1E+24
) As String
static member ToScaledString :
totalUnits : float *
format : string *
unitName : string *
symbolNames : string[] *
?decimalPlaces : int *
?minimumFactor : float *
?maximumFactor : float
(* Defaults:
let _decimalPlaces = defaultArg decimalPlaces -1
let _minimumFactor = defaultArg minimumFactor 1E-24
let _maximumFactor = defaultArg maximumFactor 1E+24
*)
-> string
GSF.Units.SI.ToScaledString = function(totalUnits, format, unitName, symbolNames, decimalPlaces, minimumFactor, maximumFactor);
View SourceParameters
- totalUnits Double
- Total units to represent textually.
- format String
- A numeric string format for scaled totalUnits.
- unitName String
- Name of unit display (e.g., you could use "m/h" for meters per hour).
- symbolNames String
- SI factor symbol or name array to use during textual conversion.
- decimalPlaces Int32 (Optional)
- Optional number of decimal places to display.
- minimumFactor Double (Optional)
- Optional minimum SI factor. Defaults to Yocto.
- maximumFactor Double (Optional)
- Optional maximum SI factor. Defaults to Yotta.
Return Value
StringA
String representation of the number of units.
Exceptions Remarks
The
symbolNames array needs one string entry for each defined SI item ordered from
least (
Yocto) to greatest (
Yotta), see
Names or
Symbols
arrays for examples.
See Also