Comparing Positions Between Two Segments

caribou-contests shared this question 5 years ago
Answered

I was wondering if there is a command that will check if two line segments are in the same position,


I am trying to create a worksheet that requires a line segment to be copied, and if I check if the new object is simply '==' to the line segment to be copied then the user can just draw another line segment on top of the existing segment and meet the condition.


I was wondering if such a command exists to compare location and length of a line segment. Or at least a quick work around by comparing the end points?


Thanks!

Comments (4)

photo
1

The comparison with "==" compares the values of the objects. And these are in this case the length of the Segments. ... You can see it at the algebra view.

photo
1

You can use the command AreEqual[ ] that yields a boolean.

See http://www.geogebra.org/man...

photo
1

Note that for Segments


  1. ==

compares the lengths, whereas

  1. AreEqual[]

compares the endpoints

photo
1

Thanks for the replies very helpful!

© 2021 International GeoGebra Institute