diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-08-10 16:21:16 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-08-11 04:24:12 +0200 |
commit | d7205a7cae869fca0b2feb15fd77aaf99ce9846b (patch) | |
tree | 187142973dd6fb66eeedacd2cb7886c9d349657f /src/plugins/platforms/wasm | |
parent | 20db9a0d7ff35f38e53487c640abb4550f0d1532 (diff) |
Add degree<->radians conversions for long double and integral types
For long double: they're just missing, so add them for completeness.
For integral types: follow the advice of C11's trigonometric
functions; first convert the angle to double, then do the actual
conversion. This is offered only for the degree->radians conversions,
as someone may legitimately want to call e.g. qDegreesToRadians(90).
On the other hand, it seems extremely unlikely that someone may
want to do a radians->degree conversion starting from integral
datatypes, so I'm not adding it for the moment being (instead,
I'm leaving a note).
[ChangeLog][QtCore][QtMath] qDegreesToRadians now also accepts
long double and integral types. A value of integral type will be
casted to double before the conversion to radians.
[ChangeLog][QtCore][QtMath] qRadiansToDegrees now also accepts
long double.
Change-Id: Ib1576be5193ae09bb6cb4a70d7a31702955df2c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platforms/wasm')
0 files changed, 0 insertions, 0 deletions