Every line of 'degrees to radians python' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
71 def degree_from_radians(angles): 72 if (type(angles) in (tuple, list)): 73 return [a / math.pi * 180 for a in angles] 74 return angles / math.pi * 180
123 def radians(self): 124 return math.radians(self.D)
106 def _sinDeg(angle): 107 return math.sin(math.radians(angle))
119 def angle_from_rotation(r): 120 return ((r.trace() - 1) / 2).acos()
65 def degreesToBytes(angle): 66 return int(float(angle) * MAX_BYTE_VAL / MAX_SERVO_POS)
22 def bearing_to_cardinal(angle): 23 """Get cardinality of an angle. 24 25 :param angle: Bearing angle. 26 :type angle: float 27 28 :return: cardinality of input angle. 29 :rtype: string 30 """ 31 32 # this method could still be improved later, since the acquisition interval 33 # is a bit strange, i.e the input angle of 22.499° will return `N` even 34 # though 22.5° is the direction for `NNE` 35 direction_list = [ 36 'N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 37 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 38 'WNW', 'NW', 'NNW' 39 ] 40 41 bearing = float(angle) 42 direction_count = len(direction_list) 43 direction_interval = 360. / direction_count 44 index = int(math.floor(bearing / direction_interval)) 45 index %= direction_count 46 return direction_list[index]
794 def radians(x): 795 if isinstance(x, Reward): 796 y = copy.copy(x) # shallow copy 797 y._compute = lambda: np.radians(x()) 798 y.range = (np.radians(x.range[0]), np.radians(x.range[1])) 799 return y 800 else: 801 return np.radians(x)
426 def _resolveangle(angle): 427 if not angle: 428 return 0 429 angle %= 360 430 return int(round(angle / ANGLE_RESOLUTION_DEGREES)) * ANGLE_RESOLUTION_DEGREES
22 def longitudinal_degrees_from_meters_at_latitude(meters, latitude): 23 one_longitudinal_degree_in_meters = width_of_longitudinal_degree_in_meters_for_latitude(latitude) 24 return meters / one_longitudinal_degree_in_meters
211 @property 212 def degrees(self): 213 return self.__degree_value