mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 23:50:27 +00:00
export hr_polygon_error
This commit is contained in:
parent
66b2b3277a
commit
0739a7c16e
@ -75,6 +75,7 @@ EX arbi_tiling& current_or_slided() {
|
||||
|
||||
EX short& id_of(heptagon *h) { return h->zebraval; }
|
||||
|
||||
#if HDR
|
||||
struct hr_polygon_error : hr_exception {
|
||||
vector<transmatrix> v;
|
||||
eGeometryClass c;
|
||||
@ -83,7 +84,11 @@ struct hr_polygon_error : hr_exception {
|
||||
map<string, cld> params;
|
||||
hr_polygon_error(const vector<transmatrix>& _v, int _id, transmatrix _e) : v(_v), c(cgclass), id(_id), end(_e) {}
|
||||
~hr_polygon_error() noexcept(true) {}
|
||||
string generate_error() {
|
||||
string generate_error();
|
||||
};
|
||||
#endif
|
||||
|
||||
string hr_polygon_error::generate_error() {
|
||||
cld dist = (hdist0(tC0(end)) / params["distunit"]);
|
||||
bool angle = abs(dist) < 1e-9;
|
||||
if(angle) dist = (atan2(end * xpush0(1)) / params["angleunit"]);
|
||||
@ -93,7 +98,6 @@ struct hr_polygon_error : hr_exception {
|
||||
lalign(0, dist)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
struct connection_debug_request : hr_exception {
|
||||
int id;
|
||||
|
Loading…
Reference in New Issue
Block a user