Ignore:
Timestamp:
Apr 23, 2010, 10:15:46 PM (13 years ago)
Author:
hudson
Message:

calc_bearing handles cases where the speed is zero, and outputs NaN.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py

    r7672 r7695  
    16261626        assert v==1
    16271627       
    1628 
     1628    def test_calc_bearings_zero_vector(self):
     1629        from math import atan, degrees
     1630
     1631        uh = 0
     1632        vh = 0
     1633        angle = calc_bearing(uh, vh)
     1634
     1635        assert angle == NAN
     1636       
    16291637#-------------------------------------------------------------
    16301638
Note: See TracChangeset for help on using the changeset viewer.