open-space-toolkit-mathematics 4.5.2__py311-none-manylinux2014_x86_64.whl → 4.5.4__py311-none-manylinux2014_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of open-space-toolkit-mathematics might be problematic. Click here for more details.

@@ -58,48 +58,206 @@ class Angle:
58
58
  __hash__: typing.ClassVar[None] = None
59
59
  @staticmethod
60
60
  def arcminutes(value: ostk.core.type.Real) -> Angle:
61
- ...
61
+ """
62
+ Create an angle from a value in arcminutes.
63
+
64
+ Args:
65
+ value (float): The angle value in arcminutes.
66
+
67
+ Returns:
68
+ Angle: An angle with the specified value in arcminutes.
69
+
70
+ Example:
71
+ >>> angle = Angle.arcminutes(60.0)
72
+ >>> angle.in_degrees() # 1.0
73
+ """
62
74
  @staticmethod
63
75
  def arcseconds(value: ostk.core.type.Real) -> Angle:
64
- ...
76
+ """
77
+ Create an angle from a value in arcseconds.
78
+
79
+ Args:
80
+ value (float): The angle value in arcseconds.
81
+
82
+ Returns:
83
+ Angle: An angle with the specified value in arcseconds.
84
+
85
+ Example:
86
+ >>> angle = Angle.arcseconds(3600.0)
87
+ >>> angle.in_degrees() # 1.0
88
+ """
65
89
  @staticmethod
66
90
  @typing.overload
67
91
  def between(first_vector: numpy.ndarray[numpy.float64[2, 1]], second_vector: numpy.ndarray[numpy.float64[2, 1]]) -> Angle:
68
- ...
92
+ """
93
+ Calculate the angle between two 2D vectors.
94
+
95
+ Args:
96
+ first_vector (np.array): The first vector.
97
+ second_vector (np.array): The second vector.
98
+
99
+ Returns:
100
+ Angle: The angle between the vectors.
101
+
102
+ Example:
103
+ >>> v1 = np.array([1.0, 0.0])
104
+ >>> v2 = np.array([0.0, 1.0])
105
+ >>> angle = Angle.between(v1, v2)
106
+ >>> angle.in_degrees() # 90.0
107
+ """
69
108
  @staticmethod
70
109
  @typing.overload
71
110
  def between(first_vector: numpy.ndarray[numpy.float64[3, 1]], second_vector: numpy.ndarray[numpy.float64[3, 1]]) -> Angle:
72
- ...
111
+ """
112
+ Calculate the angle between two 3D vectors.
113
+
114
+ Args:
115
+ first_vector (np.array): The first vector.
116
+ second_vector (np.array): The second vector.
117
+
118
+ Returns:
119
+ Angle: The angle between the vectors.
120
+
121
+ Example:
122
+ >>> v1 = np.array([1.0, 0.0, 0.0])
123
+ >>> v2 = np.array([0.0, 1.0, 0.0])
124
+ >>> angle = Angle.between(v1, v2)
125
+ >>> angle.in_degrees() # 90.0
126
+ """
73
127
  @staticmethod
74
128
  def degrees(value: ostk.core.type.Real) -> Angle:
75
- ...
129
+ """
130
+ Create an angle from a value in degrees.
131
+
132
+ Args:
133
+ value (float): The angle value in degrees.
134
+
135
+ Returns:
136
+ Angle: An angle with the specified value in degrees.
137
+
138
+ Example:
139
+ >>> angle = Angle.degrees(180.0)
140
+ >>> angle.in_radians() # ~3.14159
141
+ """
76
142
  @staticmethod
77
143
  def half_pi() -> Angle:
78
- ...
144
+ """
145
+ Create an angle of π/2 radians (90 degrees).
146
+
147
+ Returns:
148
+ Angle: An angle of π/2 radians.
149
+
150
+ Example:
151
+ >>> half_pi = Angle.half_pi()
152
+ >>> half_pi.in_degrees() # 90.0
153
+ """
79
154
  @staticmethod
80
155
  def pi() -> Angle:
81
- ...
156
+ """
157
+ Create an angle of π radians (180 degrees).
158
+
159
+ Returns:
160
+ Angle: An angle of π radians.
161
+
162
+ Example:
163
+ >>> pi = Angle.pi()
164
+ >>> pi.in_degrees() # 180.0
165
+ """
82
166
  @staticmethod
83
167
  def radians(value: ostk.core.type.Real) -> Angle:
84
- ...
168
+ """
169
+ Create an angle from a value in radians.
170
+
171
+ Args:
172
+ value (float): The angle value in radians.
173
+
174
+ Returns:
175
+ Angle: An angle with the specified value in radians.
176
+
177
+ Example:
178
+ >>> angle = Angle.radians(3.14159)
179
+ >>> angle.in_degrees() # ~180.0
180
+ """
85
181
  @staticmethod
86
182
  def revolutions(value: ostk.core.type.Real) -> Angle:
87
- ...
183
+ """
184
+ Create an angle from a value in revolutions.
185
+
186
+ Args:
187
+ value (float): The angle value in revolutions.
188
+
189
+ Returns:
190
+ Angle: An angle with the specified value in revolutions.
191
+
192
+ Example:
193
+ >>> angle = Angle.revolutions(1.0)
194
+ >>> angle.in_degrees() # 360.0
195
+ """
88
196
  @staticmethod
89
197
  def string_from_unit(unit: typing.Any) -> ostk.core.type.String:
90
- ...
198
+ """
199
+ Get the string representation of an angle unit.
200
+
201
+ Args:
202
+ unit (Angle.Unit): The angle unit.
203
+
204
+ Returns:
205
+ str: String representation of the unit.
206
+
207
+ Example:
208
+ >>> Angle.string_from_unit(Angle.Unit.Degree) # "Degree"
209
+ """
91
210
  @staticmethod
92
211
  def symbol_from_unit(unit: typing.Any) -> ostk.core.type.String:
93
- ...
212
+ """
213
+ Get the symbol representation of an angle unit.
214
+
215
+ Args:
216
+ unit (Angle.Unit): The angle unit.
217
+
218
+ Returns:
219
+ str: Symbol representation of the unit.
220
+
221
+ Example:
222
+ >>> Angle.symbol_from_unit(Angle.Unit.Degree) # "deg"
223
+ >>> Angle.symbol_from_unit(Angle.Unit.Radian) # "rad"
224
+ """
94
225
  @staticmethod
95
226
  def two_pi() -> Angle:
96
- ...
227
+ """
228
+ Create an angle of 2π radians (360 degrees).
229
+
230
+ Returns:
231
+ Angle: An angle of 2π radians.
232
+
233
+ Example:
234
+ >>> two_pi = Angle.two_pi()
235
+ >>> two_pi.in_degrees() # 360.0
236
+ """
97
237
  @staticmethod
98
238
  def undefined() -> Angle:
99
- ...
239
+ """
240
+ Create an undefined angle.
241
+
242
+ Returns:
243
+ Angle: An undefined angle.
244
+
245
+ Example:
246
+ >>> undefined_angle = Angle.undefined()
247
+ >>> undefined_angle.is_defined() # False
248
+ """
100
249
  @staticmethod
101
250
  def zero() -> Angle:
102
- ...
251
+ """
252
+ Create a zero angle.
253
+
254
+ Returns:
255
+ Angle: A zero angle (0 radians).
256
+
257
+ Example:
258
+ >>> zero_angle = Angle.zero()
259
+ >>> zero_angle.is_zero() # True
260
+ """
103
261
  def __add__(self, arg0: Angle) -> Angle:
104
262
  ...
105
263
  def __eq__(self, arg0: Angle) -> bool:
@@ -109,7 +267,17 @@ class Angle:
109
267
  def __imul__(self, arg0: ostk.core.type.Real) -> Angle:
110
268
  ...
111
269
  def __init__(self, value: ostk.core.type.Real, unit: typing.Any) -> None:
112
- ...
270
+ """
271
+ Create an angle with specified value and unit.
272
+
273
+ Args:
274
+ value (float): The numerical value of the angle.
275
+ unit (Angle.Unit): The unit of the angle (Radian, Degree, etc.).
276
+
277
+ Example:
278
+ >>> angle = Angle(3.14159, Angle.Unit.Radian)
279
+ >>> angle = Angle(180.0, Angle.Unit.Degree)
280
+ """
113
281
  def __isub__(self, arg0: Angle) -> Angle:
114
282
  ...
115
283
  def __itruediv__(self, arg0: ostk.core.type.Real) -> Angle:
@@ -131,42 +299,206 @@ class Angle:
131
299
  def __truediv__(self, arg0: ostk.core.type.Real) -> Angle:
132
300
  ...
133
301
  def get_unit(self) -> ...:
134
- ...
302
+ """
303
+ Get the unit of the angle.
304
+
305
+ Returns:
306
+ Angle.Unit: The unit of the angle.
307
+
308
+ Example:
309
+ >>> angle = Angle.degrees(90.0)
310
+ >>> angle.get_unit() # Angle.Unit.Degree
311
+ """
135
312
  @typing.overload
136
313
  def in_arcminutes(self) -> ostk.core.type.Real:
137
- ...
314
+ """
315
+ Get the angle value in arcminutes.
316
+
317
+ Returns:
318
+ float: The angle value in arcminutes.
319
+
320
+ Example:
321
+ >>> angle = Angle.degrees(1.0)
322
+ >>> angle.in_arcminutes() # 60.0
323
+ """
138
324
  @typing.overload
139
325
  def in_arcminutes(self, lower_bound: ostk.core.type.Real, upper_bound: ostk.core.type.Real) -> ostk.core.type.Real:
140
- ...
326
+ """
327
+ Get the angle value in arcminutes within specified bounds.
328
+
329
+ Args:
330
+ lower_bound (float): The lower bound in arcminutes.
331
+ upper_bound (float): The upper bound in arcminutes.
332
+
333
+ Returns:
334
+ float: The angle value in arcminutes, wrapped within bounds.
335
+ """
141
336
  @typing.overload
142
337
  def in_arcseconds(self) -> ostk.core.type.Real:
143
- ...
338
+ """
339
+ Get the angle value in arcseconds.
340
+
341
+ Returns:
342
+ float: The angle value in arcseconds.
343
+
344
+ Example:
345
+ >>> angle = Angle.degrees(1.0)
346
+ >>> angle.in_arcseconds() # 3600.0
347
+ """
144
348
  @typing.overload
145
349
  def in_arcseconds(self, lower_bound: ostk.core.type.Real, upper_bound: ostk.core.type.Real) -> ostk.core.type.Real:
146
- ...
350
+ """
351
+ Get the angle value in arcseconds within specified bounds.
352
+
353
+ Args:
354
+ lower_bound (float): The lower bound in arcseconds.
355
+ upper_bound (float): The upper bound in arcseconds.
356
+
357
+ Returns:
358
+ float: The angle value in arcseconds, wrapped within bounds.
359
+ """
147
360
  @typing.overload
148
361
  def in_degrees(self) -> ostk.core.type.Real:
149
- ...
362
+ """
363
+ Get the angle value in degrees.
364
+
365
+ Returns:
366
+ float: The angle value in degrees.
367
+
368
+ Example:
369
+ >>> angle = Angle.radians(3.14159)
370
+ >>> angle.in_degrees() # ~180.0
371
+ """
150
372
  @typing.overload
151
373
  def in_degrees(self, lower_bound: ostk.core.type.Real, upper_bound: ostk.core.type.Real) -> ostk.core.type.Real:
152
- ...
374
+ """
375
+ Get the angle value in degrees within specified bounds.
376
+
377
+ Args:
378
+ lower_bound (float): The lower bound in degrees.
379
+ upper_bound (float): The upper bound in degrees.
380
+
381
+ Returns:
382
+ float: The angle value in degrees, wrapped within bounds.
383
+
384
+ Example:
385
+ >>> angle = Angle.degrees(450.0)
386
+ >>> angle.in_degrees(-180.0, 180.0) # 90.0
387
+ """
153
388
  @typing.overload
154
389
  def in_radians(self) -> ostk.core.type.Real:
155
- ...
390
+ """
391
+ Get the angle value in radians.
392
+
393
+ Returns:
394
+ float: The angle value in radians.
395
+
396
+ Example:
397
+ >>> angle = Angle.degrees(180.0)
398
+ >>> angle.in_radians() # ~3.14159
399
+ """
156
400
  @typing.overload
157
401
  def in_radians(self, lower_bound: ostk.core.type.Real, upper_bound: ostk.core.type.Real) -> ostk.core.type.Real:
158
- ...
402
+ """
403
+ Get the angle value in radians within specified bounds.
404
+
405
+ Args:
406
+ lower_bound (float): The lower bound in radians.
407
+ upper_bound (float): The upper bound in radians.
408
+
409
+ Returns:
410
+ float: The angle value in radians, wrapped within bounds.
411
+
412
+ Example:
413
+ >>> angle = Angle.radians(7.0)
414
+ >>> angle.in_radians(-3.14159, 3.14159) # Wrapped to [-π, π]
415
+ """
159
416
  def in_revolutions(self) -> ostk.core.type.Real:
160
- ...
417
+ """
418
+ Get the angle value in revolutions.
419
+
420
+ Returns:
421
+ float: The angle value in revolutions.
422
+
423
+ Example:
424
+ >>> angle = Angle.degrees(360.0)
425
+ >>> angle.in_revolutions() # 1.0
426
+ """
161
427
  def in_unit(self, unit: typing.Any) -> ostk.core.type.Real:
162
- ...
428
+ """
429
+ Get the angle value in a specific unit.
430
+
431
+ Args:
432
+ unit (Angle.Unit): The unit to convert to.
433
+
434
+ Returns:
435
+ float: The angle value in the specified unit.
436
+
437
+ Example:
438
+ >>> angle = Angle.degrees(180.0)
439
+ >>> angle.in_unit(Angle.Unit.Radian) # ~3.14159
440
+ """
163
441
  def is_defined(self) -> bool:
164
- ...
442
+ """
443
+ Check if the angle is defined.
444
+
445
+ Returns:
446
+ bool: True if the angle is defined, False otherwise.
447
+
448
+ Example:
449
+ >>> angle = Angle.radians(1.0)
450
+ >>> angle.is_defined() # True
451
+ """
165
452
  def is_near(self, angle: Angle, tolerance: Angle) -> bool:
166
- ...
453
+ """
454
+ Check if this angle is near another angle within a tolerance.
455
+
456
+ Args:
457
+ angle (Angle): The angle to compare with.
458
+ tolerance (Angle): The tolerance for comparison.
459
+
460
+ Returns:
461
+ bool: True if angles are within tolerance, False otherwise.
462
+
463
+ Example:
464
+ >>> angle1 = Angle.degrees(30.0)
465
+ >>> angle2 = Angle.degrees(30.1)
466
+ >>> tolerance = Angle.degrees(0.2)
467
+ >>> angle1.is_near(angle2, tolerance) # True
468
+ """
167
469
  def is_negative(self) -> bool:
168
- ...
470
+ """
471
+ Check if the angle is negative.
472
+
473
+ Returns:
474
+ bool: True if the angle is negative, False otherwise.
475
+
476
+ Example:
477
+ >>> angle = Angle.degrees(-30.0)
478
+ >>> angle.is_negative() # True
479
+ """
169
480
  def is_zero(self) -> bool:
170
- ...
171
- def to_string(self, do_sanitize: ostk.core.type.Integer = False) -> ostk.core.type.String:
172
- ...
481
+ """
482
+ Check if the angle is zero.
483
+
484
+ Returns:
485
+ bool: True if the angle is zero, False otherwise.
486
+
487
+ Example:
488
+ >>> angle = Angle.zero()
489
+ >>> angle.is_zero() # True
490
+ """
491
+ def to_string(self, precision: ostk.core.type.Integer = ...) -> ostk.core.type.String:
492
+ """
493
+ Convert the angle to a string representation.
494
+
495
+ Args:
496
+ precision (int, optional): The precision for floating point numbers. Defaults to Integer.undefined().
497
+
498
+ Returns:
499
+ str: String representation of the angle.
500
+
501
+ Example:
502
+ >>> angle = Angle.degrees(90.0)
503
+ >>> angle.to_string() # "90.0 [deg]"
504
+ """