improvements in the two-point model on the sphere

This commit is contained in:
Zeno Rogue committed 2018-04-21 12:18:33 +02:00
1 parent abbf536466
commit 323893094f
4 files changed
+104 -39

No files matched your search

+9
View File
@@ -66,6 +66,15 @@ ld asin_auto(ld x) {
}
}
ld asin_auto_clamp(ld x) {
switch(cgclass) {
case gcEuclid: return x;
case gcHyperbolic: return asinh(x);
case gcSphere: return x>1 ? M_PI/2 : x<-1 ? -M_PI/2 : isnan(x) ? 0 : asin(x);
default: return x;
}
}
ld cos_auto(ld x) {
switch(cgclass) {
case gcEuclid: return 1;