Page MenuHome

Fix T86889: Rotation with top plane view glitches
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Apr 2 2021, 7:44 PM.

Details

Summary

The InputAngle function uses a flawed algorithm to correct a precision issue.

This patch refactor the logic of the function by using BLI utilities.

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 13868
Build 13868: arc lint + arc unit

Event Timeline

Germano Cavalcante (mano-wii) requested review of this revision.Apr 2 2021, 7:44 PM
Germano Cavalcante (mano-wii) created this revision.
  • Fix BLI_ASSERT_UNIT_V2_DB in Release build
This revision is now accepted and ready to land.Apr 6 2021, 7:38 AM
source/blender/blenlib/BLI_math_base.h
114

Suggest keep both saasin, add saasin_db

Campbell Barton (campbellbarton) requested changes to this revision.Apr 6 2021, 9:51 AM

Note that using double doesn't seem necessary, using your code without double precision fixes the bug: P2057.
As far as I can see the this smaller patch could be committed as a fix instead.

source/blender/blenlib/intern/math_vector_inline.c
1191

unit_length isn't used.

This revision now requires changes to proceed.Apr 6 2021, 9:51 AM
  • Use float precision

Good to see that the result is also fixed with float.
In fact, I tested this new patch a lot and I couldn't notice a change in the rotation position due to some lack of precision.

Germano Cavalcante (mano-wii) retitled this revision from Add double utilities to BLI and refactor 'InputAngle' of transform_input.c to Fix T86889: Rotation with top plane view glitches.Apr 6 2021, 3:18 PM
Germano Cavalcante (mano-wii) edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Apr 6 2021, 3:33 PM