Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Comparing 2-D co-ordinates

by Helter (Chaplain)
on Jul 31, 2003 at 14:33 UTC ( [id://279593]=note: print w/replies, xml ) Need Help??


in reply to Comparing 2-D co-ordinates

In your first line of code, you are defining a subroutine to call to sort your data. You can do anything you want in a subroutine.

So add the code that checks for overlaps (a bunch of compares for intersection) and if they overlap then determine which is longer and return that. As the sort goes through they should be sorted the way you want.

It might be cleaner (from a code standpoint) to declare the subroutine separate, and then pass a refrence to sort.

Hope this helps!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://279593]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-25 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found