thegrumpys / odop

Open Design Optimization Platform (ODOP) - Coil spring design app; mechanical springs; compression spring, extension spring, torsion spring
https://www.springdesignsoftware.org
MIT License
4 stars 5 forks source link

Use toODOPPrecision() for Cycle_Life in coil spring reports #893

Open grumpyinca opened 6 months ago

grumpyinca commented 6 months ago

Currently, the coil spring reports render the value of Cycle Life as: {this.props.symbol_table[o.Cycle_Life].value.toFixed(0)}</td>

This was a reasonable choice when Cycle_life was limited to the range of 1 to 1e7 cycles. The system now needs to render a much broader range (roughly Number.MINVALUE to Number.MAXVALUE). Rendering the extreme values with toFixed() messes up the formatting. The results will look better if toFixed() is replaced with toODOPPrecision().