We are work开发者_开发知识库ing on a flex project
I need to display a number coming from a calculation in exponential format- essentially, show 80900 as 8.09* 10^4; 4.1e-4 as 4.1*10^-4 etc
Any simple way by which I can take the number and separate the exponent and the significand- without getting into string operations.
Try to look into Number.toExponential()
method described here.
See if this helps:
"Let's create a custom formatter to change a regular number format to an exponential notation or a fixed-point notation with two fractional digits"
精彩评论