Browse Source

Math: fix & clarify a Deg conversion snippet.

Got messed up when making the documentation snippets compiled back in
673caa23bf.
pull/623/head
Burak Canik 3 years ago committed by Vladimír Vondruš
parent
commit
f79a9dfecf
  1. 6
      doc/snippets/MagnumMath.cpp

6
doc/snippets/MagnumMath.cpp

@ -703,11 +703,11 @@ if(x < 30.0_degf) foo();
Float sine(Rad angle); Float sine(Rad angle);
Float a = sine(60.0_degf); // the same as sine(1.047_radf) Float a = sine(60.0_degf); // the same as sine(1.047_radf)
Degd b = 1.047_rad; // the same as 60.0_deg Degd b = 1.047_rad; // the same as 60.0_deg
Double c = Double(b); // 60.0 //Double c = b; // error, no implicit conversion
//Float d = a; // error, no implicit conversion Double d = Double(b); // 60.0
/* [Deg-usage-conversion] */ /* [Deg-usage-conversion] */
static_cast<void>(a); static_cast<void>(a);
static_cast<void>(c); static_cast<void>(d);
} }
{ {

Loading…
Cancel
Save