Page MenuHomePhabricator

elementary: fix data los by dividing by integer
Needs RevisionPublic

Authored by akanad on Feb 17 2020, 4:47 AM.

Details

Diff Detail

Repository
rEFL core/efl
Branch
master_new8
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16062
Build 10836: arc lint + arc unit
akanad created this revision.Feb 17 2020, 4:47 AM
akanad requested review of this revision.Feb 17 2020, 4:47 AM
bu5hm4n added a comment.EditedFeb 17 2020, 5:10 AM

I do not really understand what this is about. group_pos will be an int, making this a floating point divider does not improve anything, and also not change anything afaics ?

I don't have a specific case (from a point of geometry value view) to convince this patch.
In general point of view, there is a difference between results of /2 and /2.0.
printf("%d %d", (int)(5/2 + 5/2), (int)(5/2.0 + 5/2.0));

zmike requested changes to this revision.Wed, Mar 18, 7:01 AM
zmike added a subscriber: zmike.

If you're going to make changes like this then you should at least lround or similar the values to properly and consistently convert them to ints

This revision now requires changes to proceed.Wed, Mar 18, 7:01 AM