Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch: division including a float to obtain correct result #2788

Merged
merged 1 commit into from Dec 26, 2019

Conversation

vocx-fc
Copy link
Contributor

@vocx-fc vocx-fc commented Dec 17, 2019

The LGTM code analyzer detects an issue which just affects Python 2.

In Python 3 this division will produce the correct floating point value.

Forum discussion: Arch Fence


  • Branch rebased on latest master git pull --rebase upstream master
  • Unit tests confirmed to pass by running ./bin/FreeCAD --run-test 0
  • Commit message is well-written
  • Commit message includes issue #<id> or fixes #<id> where <id> is the associated MantisBT issue id if one exists

Copy link
Contributor

@furti furti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

The question is if it wouldn't be better to add "from future import division" to the top of the file.

There are more Divisions in the code that might produce wrong results.

@vocx-fc
Copy link
Contributor Author

vocx-fc commented Dec 18, 2019

This is a simpler fix.

@yorikvanhavre yorikvanhavre merged commit aef11c1 into FreeCAD:master Dec 26, 2019
@vocx-fc vocx-fc deleted the ArchFence_fix branch December 29, 2019 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants