ScientificNotationNode¶
Overview¶
ScientificNotationNode displays a number in scientific notation, M x 10^E, where: - M is the mantissa - E is the exponent, a positive or negative integer
For example, with 2 decimal places in the mantissa, 0.0002342 would be written as 2.34 x 10^-4.
@author Chris Malley (PixelZoom, Inc.)
Class ScientificNotationNode¶
Constructor¶
new ScientificNotationNode( valueProperty : TReadOnlyProperty<number | null>, providedOptions? : ScientificNotationNodeOptions )¶
Instance Methods¶
dispose()¶
Instance Properties¶
valueProperty : TReadOnlyProperty<number | null>¶
(readonly)
Static Methods¶
toScientificNotation( value : number, providedOptions? : ToScientificNotationOptions ) : ScientificNotation¶
Converts a number to scientific-notation format: M x 10^E, with mantissa M and exponent E.
Type ScientificNotation¶
return type of toScientificNotation
- mantissa: string
- exponent: string
Type ScientificNotationNodeOptions¶
- fill?: TColor
- font?: Font
- exponent?: number | null
- mantissaDecimalPlaces?: number
- exponentScale?: number
- showIntegersAsMantissaOnly?: boolean
- showZeroAsInteger?: boolean
- showZeroExponent?: boolean
- exponentXSpacing?: number
- exponentYOffset?: number
- capHeightScale?: number
- nullValueString?: string
- & StrictOmit<NodeOptions, "children">
Type ToScientificNotationOptions¶
options for toScientificNotation
Pick<ScientificNotationNodeOptions, "mantissaDecimalPlaces" | "exponent">
Source Code¶
See the source for ScientificNotationNode.ts in the scenery-phet repository.