Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4146

Point comparison - which method is fastest?

$
0
0

Just out of curiosity, there are several methods that one can use to compare two points, notably:

if ptA.DistanceTo(ptB)<tol: return True

if ptA.DistanceToSquared(ptB)<tol: return True (supposedly faster than above)

if ptA.EpsilonEquals(ptB,tol): return True

if ptA.CompareTo(ptB)==0: return True (no tolerance value?)

and more…

Which is the fastest to run?

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4146

Trending Articles