qt5base-lts/examples/widgets/graphicsview/elasticnodes
Edward Welbourne 0b822c2209 Examples: use std::atan2 for simper angle calculations
Using std::atan2 gets the right answer directly from dy and dx,
without having to fix up quadrant as we needed to with acos (albeit we
have to negate dy in some cases, to match prior sense of angles).  In
the process, it avoids explicit division, which would be an error when
the line's length is zero.

Change-Id: Ia2923159d38834e08e6f15cbff6766ed419fa804
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-23 16:43:35 +00:00
..
edge.cpp Examples: use std::atan2 for simper angle calculations 2017-02-23 16:43:35 +00:00
edge.h Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
elasticnodes.pro clean up example project files, mostly wrt QT+=widgets 2012-12-17 14:08:17 +01:00
graphwidget.cpp Unify license header usage. 2016-03-29 10:20:03 +00:00
graphwidget.h Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
main.cpp Unify license header usage. 2016-03-29 10:20:03 +00:00
node.cpp Unify license header usage. 2016-03-29 10:20:03 +00:00
node.h Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00