Mercurial > hg > svcore
comparison base/test/TestScaleTickIntervals.h @ 1423:04ce84f21af3
Merge
author | Chris Cannam |
---|---|
date | Thu, 31 Aug 2017 18:46:03 +0100 |
parents | 8b7d6c1e1ab7 |
children | 87ae75da6527 |
comparison
equal
deleted
inserted
replaced
1422:91001e2bb96a | 1423:04ce84f21af3 |
---|---|
335 void linear_pi_avogadro_7() | 335 void linear_pi_avogadro_7() |
336 { | 336 { |
337 auto ticks = ScaleTickIntervals::linear({ M_PI, 6.022140857e23, 7 }); | 337 auto ticks = ScaleTickIntervals::linear({ M_PI, 6.022140857e23, 7 }); |
338 ScaleTickIntervals::Ticks expected { | 338 ScaleTickIntervals::Ticks expected { |
339 // not perfect, but ok-ish | 339 // not perfect, but ok-ish |
340 { 1e+22, "1.00e+22" }, | 340 { 0, "0.0e+00" }, |
341 { 1e+23, "1.00e+23" }, | 341 { 9e+22, "9.0e+22" }, |
342 { 1.9e+23, "1.90e+23" }, | 342 { 1.8e+23, "1.8e+23" }, |
343 { 2.8e+23, "2.80e+23" }, | 343 { 2.7e+23, "2.7e+23" }, |
344 { 3.7e+23, "3.70e+23" }, | 344 { 3.6e+23, "3.6e+23" }, |
345 { 4.6e+23, "4.60e+23" }, | 345 { 4.5e+23, "4.5e+23" }, |
346 { 5.5e+23, "5.50e+23" }, | 346 { 5.4e+23, "5.4e+23" }, |
347 }; | 347 }; |
348 compareTicks(ticks, expected); | 348 compareTicks(ticks, expected); |
349 } | 349 } |
350 | 350 |
351 void linear_2_3_1() | 351 void linear_2_3_1() |