moved normalize_flat to hyperpoint.cpp

This commit is contained in:
Zeno Rogue 2019-12-27 12:55:21 +01:00
parent 87933c6487
commit e44c8ee53b
2 changed files with 7 additions and 6 deletions

View File

@ -31,12 +31,6 @@ vector<hyperpoint> geometry_information::get_shape(hpcshape sh) {
return res;
}
EX hyperpoint normalize_flat(hyperpoint h) {
if(prod) return product_decompose(h).second;
if(sl2) h = slr::translate(h) * zpush0(-atan2(h[2], h[3]));
return normalize(h);
}
hyperpoint get_center(const vector<hyperpoint>& vh) {
hyperpoint h = Hypc;
for(auto h1: vh) h = h + h1;

View File

@ -399,6 +399,13 @@ EX hyperpoint normalize(hyperpoint H) {
return H;
}
/** normalize, and in product geometry, also flatten */
EX hyperpoint normalize_flat(hyperpoint h) {
if(prod) return product_decompose(h).second;
if(sl2) h = slr::translate(h) * zpush0(-atan2(h[2], h[3]));
return normalize(h);
}
/** get the center of the line segment from H1 to H2 */
EX hyperpoint mid(const hyperpoint& H1, const hyperpoint& H2) {
if(prod) {