SRB2 Message Board

SRB2 Message Board (https://mb.srb2.org/index.php)
-   Bug Reports (2.1.X) (https://mb.srb2.org/forumdisplay.php?f=104)
-   -   Fixed [2.1.17] FixedRound Always Returns 2147483647 (https://mb.srb2.org/showthread.php?t=42196)

Sryder13 12-11-2016 09:23 PM

[2.1.17] FixedRound Always Returns 2147483647
 
Code:

print(FixedRound(FRACUNIT))
prints 2147483647 for example.

Monster Iestyn 12-11-2016 09:41 PM

It appears the mistake is in how the function calculates the fractional part of the number supplied, and that the same mistake also applies to the FixedFloor, Ceil and Trunc functions.

It's quite obvious how little we've used these functions ourselves I take it.

Sryder13 12-12-2016 12:26 AM

I have put a merge request for a fix to this (and the other Fixed Rounding functions) here: http://git.magicalgirl.moe/STJr/SRB2/merge_requests/142

Monster Iestyn 01-05-2017 03:55 PM

Sryder's merge request was added to next a few days ago so this can be marked as fixed now.


All times are GMT. The time now is 02:04 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.