Return to directory of Todd's CASA extensions

This function rounds a floating point or integer value to a number of significant figures. See also roundFiguresToString.


au.roundFigures(value, digits)
  • value: value to be rounded (between 1e-20 and 1e+20)
  • digits: number of significant digits, both before or after decimal point


CASA <4>: au.roundFigures(1145.13,2)
  Out[4]: 1100.0        

CASA <13>: au.roundFigures(0.0013,1)
  Out[13]: 0.001    

-- ToddHunter - 2015-06-03
Topic revision: r2 - 2015-08-30, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback