diff --git a/stim/visualization/cylinder.h b/stim/visualization/cylinder.h index cd00daf..18f2c6e 100644 --- a/stim/visualization/cylinder.h +++ b/stim/visualization/cylinder.h @@ -28,7 +28,7 @@ class cylinder pos = inP; mags = inM; L.resize(pos.size()-1); - for(int i = 0; i < L.size; i++) + for(int i = 0; i < L.size(); i++) { L[i] += (pos[i] - pos[i+1]).len(); } @@ -94,13 +94,13 @@ class cylinder { T l = pvalue*L[L.size()-1]; int idx = findIdx(l); - return pos[idx] + (pos[idx+1]-pos[idx])*((l-L[idx])/(L[idx+1]- L[idx])); + return (pos[idx] + (pos[idx+1]-pos[idx])*((l-L[idx])/(L[idx+1]- L[idx]))); } stim::vec p(T l, int idx) { - return pos[idx] + (pos[idx+1]-pos[idx])*((l-L[idx])/(L[idx+1]- L[idx])); + return (pos[idx] + (pos[idx+1]-pos[idx])*((l-L[idx])/(L[idx+1]- L[idx]))); } ///Returns a radius at the given p-value (p value ranges from 0 to 1). @@ -109,14 +109,14 @@ class cylinder { T l = pvalue*L[L.size()-1]; int idx = findIdx(l); - return mags[idx] + (mags[idx+1]-mags[idx])*((l-L[idx])/(L[idx+1]- L[idx])); - { + return (mags[idx] + (mags[idx+1]-mags[idx])*((l-L[idx])/(L[idx+1]- L[idx]))); + } T r(T l, int idx) { - return mags[idx] + (mags[idx+1]-mags[idx])*((l-L[idx])/(L[idx+1]- L[idx])); - { + return (mags[idx] + (mags[idx+1]-mags[idx])*((l-L[idx])/(L[idx+1]- L[idx]))); + } ///returns the position of the point with a given pvalue and theta on the surface -- libgit2 0.21.4