-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add Sphere3D #186
base: master
Are you sure you want to change the base?
Add Sphere3D #186
Conversation
throw new ArgumentException("The radius is negative."); | ||
} | ||
|
||
this.CenterPoint = centerPoint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all this.
qualifiers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC we use StyleCop with default settings in this repro so if so this.
is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have already removed all "this." references in a previous commit, and the CI build didn't complain, so I thought it was an acceptable change
/// <param name="p3">The third point on the sphere</param> | ||
/// <param name="p4">The last point on the sphere</param> | ||
public static Sphere3D FromFourPoints(Point3D p1, Point3D p2, Point3D p3, Point3D p4) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would favor an implementation which is easier to follow, based for example on intersections of planes and lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be useful to have additional methods, like
- intersection of sphere with line/ray
- intersection of sphere with plane
- intersection of sphere with another sphere
- functions which check if a point lies inside/on/outside of the circle
using MathNet.Spatial.Euclidean; | ||
using NUnit.Framework; | ||
|
||
namespace MathNet.Spatial.UnitTests.Euclidean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix
/// <inheritdoc /> | ||
[Pure] | ||
public override int GetHashCode() => HashCode.Combine(this.CenterPoint, this.Radius); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: empty rows here
@fcsangminpark any updates on this? |
No description provided.