diff --git a/hyper.h b/hyper.h index 014504c0..6d10d136 100644 --- a/hyper.h +++ b/hyper.h @@ -5489,4 +5489,7 @@ namespace dual { inline reaction_t mayboth(reaction_t what) { return [=] { may_split_or_do(what); }; } } +void raise_error(); +bool invalid_matrix(const transmatrix T); + } \ No newline at end of file diff --git a/hypgraph.cpp b/hypgraph.cpp index 2e32f8a5..426d1991 100644 --- a/hypgraph.cpp +++ b/hypgraph.cpp @@ -782,6 +782,18 @@ bool invis_point(const hyperpoint h) { return h[2] < 0; } +void raise_error() { + println(hlog, "something wrong"); + } + +bool invalid_matrix(const transmatrix T) { + for(int i=0; i 1e8 || T[i][j] < -1e8 || std::isinf(T[i][j])) + return true; + for(int i=0; i .5 || T[i][j] < -.5) return false; + return true; + } + bool invalid_point(const hyperpoint h) { return std::isnan(h[DIM]) || h[DIM] > 1e8 || std::isinf(h[DIM]); }