File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ void Grid::create_sphere_grid(Quadtree quadtree) {
154
154
}
155
155
156
156
arma_cube cos_lat = cos (geoLat_scgc);
157
- cos_lat.elem ( find (cos_lat < 0.00001 ) ). fill ( 0.00001 );
157
+ cos_lat.clamp ( 0.0001 , 1.0 );
158
158
159
159
y_Center = geoLat_scgc;
160
160
x_Center = geoLon_scgc % cos_lat;
@@ -180,7 +180,7 @@ void Grid::create_sphere_grid(Quadtree quadtree) {
180
180
}
181
181
182
182
arma_cube cos_lat_L = cos (geoLat_Left);
183
- cos_lat_L.elem ( find (cos_lat_L < 0.00001 ) ). fill ( 0.00001 );
183
+ cos_lat_L.clamp ( 0.0001 , 1.0 );
184
184
185
185
x_Left = geoLon_Left % cos_lat_L;
186
186
dy_Left.set_size (nLons, nLats, nAlts);
@@ -206,7 +206,7 @@ void Grid::create_sphere_grid(Quadtree quadtree) {
206
206
}
207
207
208
208
arma_cube cos_lat_D = cos (geoLat_Down);
209
- cos_lat_D.elem ( find (cos_lat_D < 0.00001 ) ). fill ( 0.00001 );
209
+ cos_lat_D.clamp ( 0.0001 , 1.0 );
210
210
211
211
y_Down = geoLat_Down;
212
212
dx_Down = dlon * cos_lat_D;
You can’t perform that action at this time.
0 commit comments