Commit 66fe63f35bd0159c1c3c84633339517fd7c1df57

Authored by Pavel Govyadinov
1 parent 10654a1f

fixed minor typo

Showing 1 changed file with 7 additions and 7 deletions   Show diff stats
stim/visualization/cylinder.h
@@ -28,7 +28,7 @@ class cylinder @@ -28,7 +28,7 @@ class cylinder
28 pos = inP; 28 pos = inP;
29 mags = inM; 29 mags = inM;
30 L.resize(pos.size()-1); 30 L.resize(pos.size()-1);
31 - for(int i = 0; i < L.size; i++) 31 + for(int i = 0; i < L.size(); i++)
32 { 32 {
33 L[i] += (pos[i] - pos[i+1]).len(); 33 L[i] += (pos[i] - pos[i+1]).len();
34 } 34 }
@@ -94,13 +94,13 @@ class cylinder @@ -94,13 +94,13 @@ class cylinder
94 { 94 {
95 T l = pvalue*L[L.size()-1]; 95 T l = pvalue*L[L.size()-1];
96 int idx = findIdx(l); 96 int idx = findIdx(l);
97 - return pos[idx] + (pos[idx+1]-pos[idx])*((l-L[idx])/(L[idx+1]- L[idx])); 97 + return (pos[idx] + (pos[idx+1]-pos[idx])*((l-L[idx])/(L[idx+1]- L[idx])));
98 } 98 }
99 99
100 stim::vec<T> 100 stim::vec<T>
101 p(T l, int idx) 101 p(T l, int idx)
102 { 102 {
103 - return pos[idx] + (pos[idx+1]-pos[idx])*((l-L[idx])/(L[idx+1]- L[idx])); 103 + return (pos[idx] + (pos[idx+1]-pos[idx])*((l-L[idx])/(L[idx+1]- L[idx])));
104 } 104 }
105 105
106 ///Returns a radius at the given p-value (p value ranges from 0 to 1). 106 ///Returns a radius at the given p-value (p value ranges from 0 to 1).
@@ -109,14 +109,14 @@ class cylinder @@ -109,14 +109,14 @@ class cylinder
109 { 109 {
110 T l = pvalue*L[L.size()-1]; 110 T l = pvalue*L[L.size()-1];
111 int idx = findIdx(l); 111 int idx = findIdx(l);
112 - return mags[idx] + (mags[idx+1]-mags[idx])*((l-L[idx])/(L[idx+1]- L[idx]));  
113 - { 112 + return (mags[idx] + (mags[idx+1]-mags[idx])*((l-L[idx])/(L[idx+1]- L[idx])));
  113 + }
114 114
115 T 115 T
116 r(T l, int idx) 116 r(T l, int idx)
117 { 117 {
118 - return mags[idx] + (mags[idx+1]-mags[idx])*((l-L[idx])/(L[idx+1]- L[idx]));  
119 - { 118 + return (mags[idx] + (mags[idx+1]-mags[idx])*((l-L[idx])/(L[idx+1]- L[idx])));
  119 + }
120 120
121 121
122 ///returns the position of the point with a given pvalue and theta on the surface 122 ///returns the position of the point with a given pvalue and theta on the surface