moved normalize_flat to hyperpoint.cpp
This commit is contained in:
parent
87933c6487
commit
e44c8ee53b
|
@ -31,12 +31,6 @@ vector<hyperpoint> geometry_information::get_shape(hpcshape sh) {
|
||||||
return res;
|
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 get_center(const vector<hyperpoint>& vh) {
|
||||||
hyperpoint h = Hypc;
|
hyperpoint h = Hypc;
|
||||||
for(auto h1: vh) h = h + h1;
|
for(auto h1: vh) h = h + h1;
|
||||||
|
|
|
@ -399,6 +399,13 @@ EX hyperpoint normalize(hyperpoint H) {
|
||||||
return 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 */
|
/** get the center of the line segment from H1 to H2 */
|
||||||
EX hyperpoint mid(const hyperpoint& H1, const hyperpoint& H2) {
|
EX hyperpoint mid(const hyperpoint& H1, const hyperpoint& H2) {
|
||||||
if(prod) {
|
if(prod) {
|
||||||
|
|
Loading…
Reference in New Issue