SRB2 Message Board  

Go Back   SRB2 Message Board > Archived > SRB2 Forum Archives > Bug Reports (2.1.X)

 
 
Thread Tools Search this Thread
Old 12-11-2016   #1
Sryder13
'That brit'
Judge
 
Sryder13's Avatar
Default [2.1.17] FixedRound Always Returns 2147483647

Code:
print(FixedRound(FRACUNIT))
prints 2147483647 for example.
__________________
Quote:
<MonsterIestyn> try ctrl+f masturbation and get to the point

Last edited by Monster Iestyn; 01-05-2017 at 03:54 PM.
Sryder13 is offline  
Old 12-11-2016   #2
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

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.
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record.
Monster Iestyn is online now  
Old 12-12-2016   #3
Sryder13
'That brit'
Judge
 
Sryder13's Avatar
Default

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
__________________
Quote:
<MonsterIestyn> try ctrl+f masturbation and get to the point
Sryder13 is offline  
Old 01-05-2017   #4
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

Sryder's merge request was added to next a few days ago so this can be marked as fixed now.
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record.
Monster Iestyn is online now  
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:04 PM.


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