chiark / gitweb /
scale 125 seems to work ish although could be more bowl-like
[moebius2.git] / common.c
index cc72ed3341dfd9f8c2f56cf82259e7fcaf3a899d..bfe11b7dc23851e0e427f45533a86d9df2f0b112 100644 (file)
--- a/common.c
+++ b/common.c
@@ -5,14 +5,7 @@
 #include "common.h"
 
 double magnD(const double pq[D3]) {
-  gsl_vector v;
-
-  v.size= D3;
-  v.stride= 1;
-  v.data= (double*)pq;
-  /* owner and block ought not to be used */
-
-  return gsl_blas_dnrm2(&v);
+  return sqrt(magnD2(pq));
 }
 
 double magnD2(const double pq[D3]) {
@@ -82,4 +75,4 @@ void gsldie(int l, const char *what, int status) {
 
 void diee(const char *what) { perror(what); exit(16); }
 void fail(const char *emsg) { fputs(emsg,stderr); exit(12); }
-void flushoutput(void) { if (fflush(stdout)||ferror(stdout)) diee("stdout"); }
+void flushoutput(void) { if (ferror(stdout)||fflush(stdout)) diee("stdout"); }