10 examples of 'degrees to radians python' in Python

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.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
71def 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
123def radians(self):
124 return math.radians(self.D)
106def _sinDeg(angle):
107 return math.sin(math.radians(angle))
119def angle_from_rotation(r):
120 return ((r.trace() - 1) / 2).acos()
65def degreesToBytes(angle):
66 return int(float(angle) * MAX_BYTE_VAL / MAX_SERVO_POS)
22def 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]
794def 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)
426def _resolveangle(angle):
427 if not angle:
428 return 0
429 angle %= 360
430 return int(round(angle / ANGLE_RESOLUTION_DEGREES)) * ANGLE_RESOLUTION_DEGREES
22def 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
212def degrees(self):
213 return self.__degree_value

Related snippets