Re: Double value is rounded to unexpected value: 2.5 -> 2 instead of 3

2017-07-08 Thread alex_ca via Digitalmars-d-learn
Thanks, that was what was happening.

Double value is rounded to unexpected value: 2.5 -> 2 instead of 3

2017-07-07 Thread alex_ca via Digitalmars-d-learn
Hi, I'm having trouble understanding why in some cases a double value will be rounded up and other times down, for the same code. Here's a snippet with code I tried to debug: int getNumberOfStitchesForRowLength(double rowLength) { writeln("input ", rowLength, " ",