Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public String toString() {
public static Vector2D intersectionOfTwoLines(Vector2D p1, Vector2D r1, Vector2D p2, Vector2D r2)
{

//u = (p2 p1) × r1 / (r1 × r2)
//u = (p2 - p1) × r1 / (r1 × r2)
//out = p2 + u x r2

double u = ((p2.sub(p1)).dot(r1)) / r1.dot(r2);
Expand Down
2 changes: 1 addition & 1 deletion iOS/G3MiOSSDK/Commons/Geometry/Vector2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const std::string Vector2D::description() const {
Vector2D Vector2D::intersectionOfTwoLines(const Vector2D& p1, const Vector2D& r1,
const Vector2D& p2, const Vector2D& r2) {

//u = (p2 p1) × r1 / (r1 × r2)
//u = (p2 - p1) × r1 / (r1 × r2)
//out = p2 + u x r2

double u = ((p2.sub(p1)).dot(r1)) / r1.dot(r2);
Expand Down