"Value" of undefined point?
Answered
I've got students moving two segments around and I want to know when the segments intersect and when they do not. I've defined a point at the intersection of the two segments as N. When the segments intersect, I N gives me the coordinates of the intersection point. When they don't intersect, the point N is "undefined." All that is great!
I need to know when N is undefined, using a boolean variable Intersect. I tried something like If(N==?, SetValue(Intersect,false),SetValue(Intersect,true)). Didn't work. Neither did N==(?,?) or N==undefined.
Any suggestions? How do I "read" when a point is undefined?
Thanks!
The test N == N gives true when N is defined and undefined when it is not defined.chris
Alternative: maybe you you want use the command
IsDefined(<object>) (the result is a boolean)
see attachment
PS:
for me and maybe only for me is <object> == <object> exotic/intransparent, and very near to a bug.
Thank you, both! Works fine now.
Comments have been locked on this page!