quadgrid
0.1
simple cartesian quad grid with particles for c++/octave
Toggle main menu visibility
Loading...
Searching...
No Matches
mmorton.h
Go to the documentation of this file.
1
#ifndef HAVE_MMORTON_H
2
#define HAVE_MMORTON_H
3
4
#include <cstdint>
5
#include <numeric>
6
7
using
coord_t
= uint_least32_t;
8
using
morton_code_t
= uint_fast64_t;
9
10
constexpr
coord_t
max_level
= 31;
11
constexpr
coord_t
max_coord
= std::numeric_limits<coord_t>::max ();
12
13
morton_code_t
14
coord_2_morton
(
coord_t
_x,
coord_t
_y);
15
16
void
17
morton_2_coord
(
morton_code_t
code,
coord_t
&_x,
coord_t
&_y);
18
19
#endif
// HAVE_MMORTON_H
morton_2_coord
void morton_2_coord(morton_code_t code, coord_t &_x, coord_t &_y)
Definition
mmorton.cc:75
coord_2_morton
morton_code_t coord_2_morton(coord_t _x, coord_t _y)
Definition
mmorton.cc:8
max_coord
constexpr coord_t max_coord
Definition
mmorton.h:11
morton_code_t
uint_fast64_t morton_code_t
Definition
mmorton.h:8
max_level
constexpr coord_t max_level
Definition
mmorton.h:10
coord_t
uint_least32_t coord_t
Definition
mmorton.h:7
include
mmorton.h
Generated by
1.18.0