Quantcast
Channel: Fluent Assertions
Viewing all articles
Browse latest Browse all 1402

New Post: Floating point precision

$
0
0

Are there any plans to be able to specify the precision with which floating point assertions are made? For instance,

double angleOfAttack = CalculatePitchAtStallPoint(double airSpeed, double liftCoefficient);
angleOfAttack.Should().Be(35.4).Within(0.2);

You can achieve that now by combining BeGreaterThan and BeLessThan, but it's a bit of a hack.


Viewing all articles
Browse latest Browse all 1402


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>