Package pyllar :: Module Utils
[hide private]
[frames] | no frames]

Source Code for Module pyllar.Utils

 1  """ Pyllar utilities. """ 
 2  
 
 3  
 
 4  # Angle conversions
 
5 -def rad2deg(val): return val*57.2957795
6
7 -def deg2rad(val): return val*0.0174532925
8 9 PI = 3.14159 10 11 # cross product of two vector 12 #def cross(v1, v2): 13 # if v1.length()!=3 or v2.length()!=3: 14 # print "cross: vectors bust be length 3." 15 # return 16 # 17 # result = array([ v1[1]*v2[2]-v1[2]*v2[1], v1[2]*v2[0]-v1[0]*v2[2], v1[0]*v2[1]-v1[1]*v2[0] ]) 18 # 19 # return result 20