tile2d
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
base.hpp File Reference

A primary include file for all other files. Its purpose is to contain "#include"s that are not within this project, i.e. ' <external> ' and not ' "internal" ', and define 'Float', 'vec2', and tile sizes to allow quickly switching between different floating type representations, packing, and of course tile sizes. More...

#include <vector>
#include <iterator>
#include <cassert>
#include <array>
#include <set>
#include <bitset>
#include <stack>
#include <glm/glm.hpp>
#include <glm/gtx/rotate_vector.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/norm.hpp>
#include <glm/gtx/vector_angle.hpp>
#include <boost/unordered/unordered_flat_map.hpp>
#include <boost/unordered/unordered_flat_set.hpp>
#include <boost/pool/object_pool.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/bind/bind.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/locks.hpp>

Go to the source code of this file.

Macros

#define GLM_ENABLE_EXPERIMENTAL
 
#define T2D_NAMESPACE_BEGIN   namespace t2d {
 
#define T2D_NAMESPACE_END   }
 

Typedefs

using Float = float
 
using vec2 = glm::vec<2, Float, glm::packed_lowp>
 
template<typename K , typename T >
using FlatMap = boost::unordered_flat_map<K, T>
 
template<typename K >
using FlatSet = boost::unordered_flat_set<K>
 

Functions

template<typename T >
T constexpr impl::sqrtNewtonRaphson (T x, T curr, T prev)
 
template<typename T >
T constexpr sqrt (T x)
 Returns the sqaure root of some constant x.
 
template<typename T >
bool isNaN (const T &v)
 
template<>
bool isNaN< vec2 > (const vec2 &v)
 

Detailed Description

A primary include file for all other files. Its purpose is to contain "#include"s that are not within this project, i.e. ' <external> ' and not ' "internal" ', and define 'Float', 'vec2', and tile sizes to allow quickly switching between different floating type representations, packing, and of course tile sizes.

Function Documentation

◆ sqrt()

template<typename T >
T constexpr sqrt ( T x)
constexpr

Returns the sqaure root of some constant x.

Parameters
xThe number to get the constant of
Returns
The sqaure root of x