Subsurface ignores a temp of 0˚C

Dirk Hohndel dirk at hohndel.org
Wed Jan 23 12:39:16 PST 2013


Linus Torvalds <torvalds at linux-foundation.org> writes:

> On Wed, Jan 23, 2013 at 12:09 PM, Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
>>
>>> - Negative temperature values doesn't seem to be displayed in the profile
>>
>> Mind sending me your XML file, I'll take a look..
>
> Heh. They are displayed. But the rounding is wrong for them, so -1 is
> rounded to 0.
>
> We use "(int)(val+0.5)" which works fine for positive values, but for
> negative values integer truncation truncates towards zero. So -1+0.5
> is -0.5, and then truncates to 0.
>
> This should fix things, and prints things out more nicely anyway if
> you happen to have fractional degrees.
>


Can I get one patch that fixes all this, has an SOB and Henrik's ACK?

/D


More information about the subsurface mailing list