Browse Source

Math: update Half doc snippets to reflect what's actually printed.

WTF was I doing there.
pull/580/head
Vladimír Vondruš 4 years ago
parent
commit
1f1041b4b0
  1. 6
      doc/snippets/MagnumMath.cpp

6
doc/snippets/MagnumMath.cpp

@ -994,8 +994,8 @@ static_cast<void>(bClamped);
using namespace Math::Literals; using namespace Math::Literals;
Half a = 3.14159_h; Half a = 3.14159_h;
Debug{} << a; // Prints 3.14159 Debug{} << a; // Prints 3.141
Debug{} << Float(a); // Prints 3.14159 Debug{} << Float(a); // Prints 3.14062
Debug{} << UnsignedShort(a); // Prints 25675 Debug{} << UnsignedShort(a); // Prints 25675
/* [Half-usage] */ /* [Half-usage] */
} }
@ -1004,7 +1004,7 @@ Debug{} << UnsignedShort(a); // Prints 25675
/* [Half-usage-vector] */ /* [Half-usage-vector] */
Vector3h a{3.14159_h, -1.4142_h, 1.618_h}; Vector3h a{3.14159_h, -1.4142_h, 1.618_h};
Vector3 b{a}; // converts to 32-bit floats Vector3 b{a}; // converts to 32-bit floats
Debug{} << a; // prints {3.14159, -1.4142, 1.618} Debug{} << a; // prints {3.141, -1.414, 1.618}
Debug{} << Vector3us{a}; // prints {16968, 48552, 15993} Debug{} << Vector3us{a}; // prints {16968, 48552, 15993}
/* [Half-usage-vector] */ /* [Half-usage-vector] */
} }

Loading…
Cancel
Save