Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRIDEDIT-830 Added calculation of curvature for curvlinear grid #274

Merged
merged 6 commits into from
Jan 15, 2024

Conversation

BillSenior
Copy link
Contributor

No description provided.

@BillSenior BillSenior merged commit 1fe4e34 into master Jan 15, 2024
11 checks passed
@BillSenior BillSenior deleted the feature/GRIDEDIT-830_curvilinear_grid_curvature branch January 15, 2024 14:29
Comment on lines +72 to +83
double diffX10 = p1.x - p0.x;
double diffY10 = p1.y - p0.y;

double diffX20 = p2.x - p0.x;
double diffY20 = p2.y - p0.y;

double diffX21 = p2.x - p1.x;
double diffY21 = p2.y - p1.y;

// Twice the area of the triangle formed by the points {p0, p1, p2}
double area2 = diffX10 * diffY21 - diffY10 * diffX21;
double distance01 = std::sqrt(diffX10 * diffX10 + diffY10 * diffY10);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all these guys can be const

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants