new Double()
Represents a baja:Double in BajaScript.
Augments Number to be a Baja Double. ECMAScript only has one numeric
type for Doubles, Floats, Longs and Integers. Therefore, this type
naturally maps to baja:Double.
Extends
Members
-
<static> DEFAULT :Number
-
Default
Numberinstance.Type:
- Number
Methods
-
<static> getFacetsFromINumeric(numeric)
-
Return facets from an INumeric
Parameters:
Name Type Description numericbaja.Value Returns:
- Type
- baja.Facets
-
<static> getNumberFromINumeric()
-
Return a
Numberfrom a BINumeric.Returns:
- Type
- Number
-
<static> make(num)
-
Make a
Number.Parameters:
Name Type Description numNumber the number value.
Returns:
- Type
- Number
-
decodeFromString(str)
-
Decode a
Numberfrom aString.Parameters:
Name Type Description strString an encoded
Number.Returns:
- Type
- Number
-
encodeToString()
-
Encode the
Number(itself) to aString.Returns:
- Type
- String
-
equals(obj)
-
Equality test.
Parameters:
Name Type Description objReturns:
- Type
- Boolean
-
equivalent(obj)
-
Equivalence test.
Used to compare if two objects have equivalent state, but might not want to
return true for equals since it it has implied semantics for many
operations. The default implementation returns the result of
equals().Parameters:
Name Type Description objReturns:
- Type
- Boolean
-
getDataTypeSymbol()
-
Return the data type symbol.
Used for encoding this data type (primarily for facets).
Returns:
- Type
- String
-
getIcon()
-
Return the Object's Icon.
Returns:
- Type
- baja.Icon
-
getNumber()
-
Return the
Number(itself).Returns:
- Type
- Number
-
getNumeric()
-
Returns the
Number(itself).Returns:
- Type
- Number
-
make(num)
-
Make a
Number.Parameters:
Name Type Description numNumber the number value.
Returns:
- Type
- Number
-
newCopy()
-
New Copy.
Returns:
- Type
- Number
-
toString( [cx])
-
Return the
Stringrepresentation of theDouble(itself).Parameters:
Name Type Argument Description cxbaja.Facets | Object <optional>
used to specify formatting facets. The
argument can also be an Object Literal.Properties
Name Type Argument Description forceSignBoolean <optional>
specifying 'true' will concatenate a '+'
to the beginning of the number if positive.precisionNumber <optional>
the number of decimal places to show in
the return string. Specifying '0' will also remove the decimal. If a context
is provided without precision, this value will default to 2. If no context
is provided, there will be no precision applied.showSeparatorsBoolean <optional>
include separators.
unitsbaja.Unit <optional>
the baja Unit to apply to the return
string.unitConversionbaja.Enum | Number | String <optional>
the
baja:UnitConversionenum, an ordinal, or tag. If omitted, the
user-configuredbaja.getUnitConversion()will be used.zeroPadNumber <optional>
the minimum number of the whole-number
digits to be displayed, filling in zeroes when necessary.trimTrailingZerosboolean <optional>
set to true if trailing zeros
should not be included in the string. If the only digits after the decimal
point are zeros, the decimal point will be removed as well.Returns:
returns a Promise if a cx is passed in.