/cppDegRad

An example of using C++11's user-defined literals to enforce consistent units of measure. Defines two classes - Radians and Degrees - which implicitly convert between each other, and can be used to prevent mismatching units in 3D graphics APIs.

Primary LanguageC++MIT LicenseMIT

DegRad

Example of using user-defined literals and implicit conversions to enforce units of measure in the C++ type system. Example usage can be found in degrad.cpp and for more information on the rationale and design, see this blogpost.

Released under the MIT license. See LICENSE for more details.