blob: 780e28ecd10151aa002ece616ae08d5c69009bfb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#pragma once
#include "ico.hpp"
namespace kel {
template<uint64_t SubD = 0u>
class ico_coordinate {
private:
static constexpr uint64_t sub_divs_ = impl::power_two<SubD>::value;
uint64_t t_;
uint64_t x_;
uint64_t y_;
public:
ico_coordinate(uint64_t t__, uint64_t x__, uint64_t y__):
t_{t__},
x_{x__},
y_{y__}
{}
bool is_on_border() const {
auto comb = x_+y_;
bool farside_b = (comb == sub_divs_);
bool right_b = (y_ == 0u);
bool left_b = (x_ == 0u);
return farside_b or right_b or left_b;
}
ico_coordinate<SubD> move_x_pos() const {
uint64_t x_mov = x_ + 1u;
}
};
}
|