qt6-bb10/examples/widgets
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
..
animation Examples: Remove a redundant virtual specifier for overriders 2016-11-25 22:36:21 +00:00
desktop Merge remote-tracking branch 'origin/5.8' into dev 2017-01-25 20:06:06 +01:00
dialogs Example: migrate the classwizard example to use QRegularExpression 2017-01-24 20:28:41 +00:00
doc Doc: Fixed old text still mentioning QRegExp 2017-01-24 20:28:22 +00:00
draganddrop Merge remote-tracking branch 'origin/5.7' into dev 2016-08-16 07:58:32 +02:00
effects Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
gestures Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
graphicsview Examples: use std::atan2 for simper angle calculations 2017-02-23 16:43:35 +00:00
itemviews Examples: use std::atan2 for simper angle calculations 2017-02-23 16:43:35 +00:00
layouts Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
mac macOS: Make QMacNativeWidget example more usable 2017-02-12 12:29:55 +00:00
mainwindows examples: Use lambdas instead of functor classes 2017-01-09 15:42:13 +00:00
painting Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-16 21:51:11 +01:00
richtext examples: Use QOverload to select overloaded signals and slots 2016-12-22 14:54:55 +00:00
scroller Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
statemachine Examples: Remove more redundant virtual specifiers for overriders 2016-11-29 10:06:02 +00:00
tools Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-16 21:51:11 +01:00
tutorials Tutorial: migrate addressbook tutorial to use QRegularExpression 2017-01-24 07:24:13 +00:00
widgets Example: migrate stylesheet example to use QRegularExpression 2017-02-15 14:45:29 +00:00
windowcontainer Examples: Replace 'Q_DECL_OVERRIDE' by 'override' 2016-06-15 09:32:30 +00:00
widgets.pro Clean up some conditions in our pro files 2016-11-14 19:22:17 +00:00