summaryrefslogtreecommitdiffstats
path: root/uemis.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-02-09 10:23:15 +1100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-08 18:15:51 -0800
commitb286ea638c8ce468cf9c1a1b5037867acb5d6fe4 (patch)
treee6d593baf90d399b0532e0b6033905f219692483 /uemis.c
parentff969cd5c84824170b382901b49a97564bf72bfa (diff)
downloadsubsurface-b286ea638c8ce468cf9c1a1b5037867acb5d6fe4.tar.gz
Simplify/clarify the get_surface_pressure_in_mbar() function
Instead of maintaining a rolling average and re-calculating it at each stage, just calculate the surface_pressure average the natural way: as the sum divided by the number of entries. This results in a single rounding, rather than doing rounding multiple times and possibly rounding wrong as a result. Not that we care all that deeply about the LSB of the mbar value, but the code is simpler and more obvious this way too. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'uemis.c')
0 files changed, 0 insertions, 0 deletions