Fixed.hpp File Reference
#include <PlayRho/Common/Wider.hpp>
#include <PlayRho/Common/Templates.hpp>
#include <cstdint>
#include <limits>
#include <cassert>
#include <type_traits>
#include <iostream>

Go to the source code of this file.

Classes

class  playrho::Fixed< BASE_TYPE, FRACTION_BITS >
 Template class for fixed-point numbers. More...
 

Namespaces

 playrho
 

Typedefs

using playrho::Fixed32 = Fixed< std::int32_t, 9 >
 32-bit fixed precision type. More...
 

Functions

template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR bool playrho::operator== (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Equality operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR bool playrho::operator!= (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Inequality operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR bool playrho::operator< (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Less-than operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR bool playrho::operator> (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Greater-than operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR bool playrho::operator<= (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Less-than or equal-to operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR bool playrho::operator>= (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Greater-than or equal-to operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR Fixed< BT, FB > playrho::operator+ (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Addition operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR Fixed< BT, FB > playrho::operator- (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Subtraction operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR Fixed< BT, FB > playrho::operator* (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Multiplication operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR Fixed< BT, FB > playrho::operator/ (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Division operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR Fixed< BT, FB > playrho::operator% (Fixed< BT, FB > lhs, Fixed< BT, FB > rhs) noexcept
 Modulo operator. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR bool playrho::AlmostZero (Fixed< BT, FB > value)
 Gets whether a given value is almost zero. More...
 
template<typename BT , unsigned int FB>
PLAYRHO_CONSTEXPR bool playrho::AlmostEqual (Fixed< BT, FB > x, Fixed< BT, FB > y, int ulp=2)
 Determines whether the given two values are "almost equal". More...
 
template<typename BT , unsigned int FB>
inline ::std::ostream & playrho::operator<< (::std::ostream &os, const Fixed< BT, FB > &value)
 Output stream operator. More...
 
template<>
PLAYRHO_CONSTEXPR d2::AABB playrho::GetInvalid () noexcept
 Gets an invalid AABB value. More...
 
PLAYRHO_CONSTEXPR Fixed32 playrho::operator+ (Fixed32 lhs, Fixed32 rhs) noexcept
 Addition operator. More...
 
PLAYRHO_CONSTEXPR Fixed32 playrho::operator- (Fixed32 lhs, Fixed32 rhs) noexcept
 Subtraction operator. More...
 
PLAYRHO_CONSTEXPR Fixed32 playrho::operator* (Fixed32 lhs, Fixed32 rhs) noexcept
 Multiplication operator. More...
 
PLAYRHO_CONSTEXPR Fixed32 playrho::operator/ (Fixed32 lhs, Fixed32 rhs) noexcept
 Division operator. More...
 
PLAYRHO_CONSTEXPR Fixed32 playrho::operator% (Fixed32 lhs, Fixed32 rhs) noexcept
 Modulo operator. More...
 
PLAYRHO_CONSTEXPR bool playrho::operator== (Fixed32 lhs, Fixed32 rhs) noexcept
 Equality operator. More...
 
PLAYRHO_CONSTEXPR bool playrho::operator!= (Fixed32 lhs, Fixed32 rhs) noexcept
 Inequality operator. More...
 
PLAYRHO_CONSTEXPR bool playrho::operator<= (Fixed32 lhs, Fixed32 rhs) noexcept
 Less-than or equal-to operator. More...
 
PLAYRHO_CONSTEXPR bool playrho::operator>= (Fixed32 lhs, Fixed32 rhs) noexcept
 Greater-than or equal-to operator. More...
 
PLAYRHO_CONSTEXPR bool playrho::operator< (Fixed32 lhs, Fixed32 rhs) noexcept
 Less-than operator. More...
 
PLAYRHO_CONSTEXPR bool playrho::operator> (Fixed32 lhs, Fixed32 rhs) noexcept
 Greater-than operator. More...
 
template<>
const char * playrho::GetTypeName< Fixed32 > () noexcept
 Gets the specialized name for the Fixed32 type. More...