From 8cf411c3ea23c30da1ccf246b9ae00301024c421 Mon Sep 17 00:00:00 2001 From: fauder Date: Thu, 13 Jul 2023 20:29:11 +0300 Subject: [PATCH] debuggers/magnum.natvis: display the angle in Deg/Rad nicely (along w/ equivalent Rad/Deg in parentheses) There are two variants per angle type, so a total of four entries. There are separate entries for Float & Double variants because in order to calculate the equivalent value for the given angle type in the other type, I used the same exact values for the multipliers as the ones in Magnum::Math (utilizing Math::Constants::pi()). Also I used the format specifier 'h' (hexadecimal integer) for Double variants, as it shows a lot more digits, which may be more desirable when working with double data types for angles. --- src/debuggers/natvis/magnum.natvis | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/debuggers/natvis/magnum.natvis b/src/debuggers/natvis/magnum.natvis index 87755f54b..7c5e5dfcb 100644 --- a/src/debuggers/natvis/magnum.natvis +++ b/src/debuggers/natvis/magnum.natvis @@ -7,6 +7,7 @@ 2020, 2021, 2022, 2023 Vladimír Vondruš Copyright © 2021 Jonathan Hale Copyright © 2023 Pablo Escobar + Copyright © 2023 Burak Canik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -160,4 +161,24 @@ + + + {_value,g}° ({_value * 0.0174532924,g} radians) + {_value,g}° ({_value * 0.0174532924,g} radians) + + + + {_value,h}° ({_value * 0.017453292519943295,h} radians) + {_value,h}° ({_value * 0.017453292519943295,h} radians) + + + + {_value,g} radians ({_value * 57.2957764,g}°) + {_value,g} radians ({_value * 57.2957764,g}°) + + + + {_value,h} radians ({_value * 57.295779513082323,h}°) + {_value,h} radians ({_value * 57.295779513082323,h}°) +