Skip to content

Commit

Permalink
Merge pull request #514 from MFraters/optimize_bezier_curve
Browse files Browse the repository at this point in the history
Small optimalization for bezier curve in spherical coordinates
  • Loading branch information
MFraters authored Sep 9, 2023
2 parents 78f1200 + 7159b64 commit 987f86b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/world_builder/objects/bezier_curve.cc
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ namespace WorldBuilder
}
else
{
const double cos_cp_lat = cos(cp[1]);
for ( size_t cp_i = 0; cp_i < control_points.size(); ++cp_i)
{
const Point<2> &p1 = points[cp_i];
Expand All @@ -375,7 +376,6 @@ namespace WorldBuilder
const Point<2> d = points[cp_i];

Point<2> estimate_point = a*est*est*est+b*est*est+c*est+d;
const double cos_cp_lat = cos(cp[1]);
#ifndef NDEBUG
const double cos_lat_dg = cos(estimate_point[1]);
const double sin_d_long_h_dg = sin((estimate_point[0]-cp[0])*0.5);
Expand Down

0 comments on commit 987f86b

Please sign in to comment.