Changeset 5284


Ignore:
Timestamp:
May 6, 2008, 4:40:00 PM (16 years ago)
Author:
ole
Message:

Comments and minor cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/utilities/polygon.py

    r5282 r5284  
    6666        status == 2: Coinciding line segment found. Value taks the form [[x0,y0], [x1,y1]]
    6767        status == 3: Lines would coincide but only if extended. Value set to None
    68         status == 4: Lines are parallel with a fixed distance apart. Value set to that distance.
     68        status == 4: Lines are parallel with a fixed distance apart. Value set to None.
    6969   
    7070    """
     
    150150        else:
    151151            # Lines are parallel but they don't coincide
    152             return 4, None
     152            return 4, None #FIXME (Ole): Add distance here instead of None
    153153           
    154154    else:
     
    160160        y = y0 + u0*(y1-y0)
    161161
     162        # Sanity check - can be removed to speed up if needed
    162163        assert allclose(x, x2 + u1*(x3-x2))
    163164        assert allclose(y, y2 + u1*(y3-y2))       
     
    167168            # We have intersection
    168169
    169             return 1, [x, y]
     170            return 1, array([x, y])
    170171        else:
    171172            # No intersection
Note: See TracChangeset for help on using the changeset viewer.