@@ -59,7 +59,7 @@ Features
59
59
Vector2
60
60
-------
61
61
62
- .. class: Vector2
62
+ .. class :: Vector2
63
63
64
64
Defines a simple two-dimensional, mutable vector.
65
65
@@ -229,12 +229,12 @@ Example:
229
229
The named argument "degrees" or "radians" may be passed in to rotate
230
230
this vector by the specified amount in degrees (or radians),
231
231
respectively. If both are omitted, the first unnamed argument is
232
- assummed to be the amount to rotate in radians.
232
+ assumed to be the amount to rotate in radians.
233
233
234
234
Additionally, the named argument "about" may be passed in to specify
235
235
about what the vector should be rotated. If omitted then the first
236
236
unconsumed unnamed argument is assumed to be the vector. If there are
237
- no unconsumed unamed arguments then the origin is assumed.
237
+ no unconsumed unnamed arguments then the origin is assumed.
238
238
239
239
Examples:
240
240
@@ -417,24 +417,24 @@ Defines an undirected two-dimensional line by an axis, a minimum and a maximum.
417
417
.. note ::
418
418
419
419
`min ` and `max ` are referring to nearness to negative and positive infinity,
420
- respectively. The absolute value of `min ` may be larger than `max `.
420
+ respectively. The absolute value of `min ` may be larger than that of `max `.
421
421
422
422
.. note ::
423
423
424
- `AxisAlignedLine`s are an intermediary operation, so offsets should be baked
424
+ AxisAlignedLines are an intermediary operation, so offsets should be baked
425
425
into them.
426
426
427
- .. attribute AxisAlignedLine.axis
427
+ .. attribute :: AxisAlignedLine.axis
428
428
429
429
`Vector2 ` the axis this line is along.
430
430
431
- .. attribute AxisAlignedLine.min
431
+ .. attribute :: AxisAlignedLine.min
432
432
433
433
`numeric ` the number (closest to negative infinity) that is still on this
434
434
line when walked along the axis. If negative, it may have a greater absolute
435
435
value than max and implies walking in the opposite direction of the axis.
436
436
437
- .. attribute AxisAlignedLine.max
437
+ .. attribute :: AxisAlignedLine.max
438
438
439
439
`numeric ` the number (closest to positive infinity) that is still on this
440
440
line when walked along the axis. If negative, it may have a smaller absolute
@@ -446,16 +446,18 @@ Defines an undirected two-dimensional line by an axis, a minimum and a maximum.
446
446
- **point1 ** - `numeric ` one point on this line
447
447
- **point2 ** - `numeric ` a different point on this line
448
448
449
- Constructs an axis aligned line with the appropriate min and max.
449
+ Construct an axis aligned line with the appropriate min and max.
450
450
451
451
.. staticmethod :: AxisAlignedLine.intersects(line1, line2)
452
452
453
453
- **line1 ** - `AxisAlignedLine ` the first line
454
454
- **line2 ** - `AxisAlignedLine ` the second line
455
455
- **Return Value ** - `bool, bool ` touching, overlapping
456
456
457
- Determines if the two lines are touching and if they are, if
458
- they are overlapping.
457
+ Determine if the two lines are touching and if they are, if
458
+ they are overlapping. Lines are touching if they share only
459
+ one end point, whereas they are overlapping if they share
460
+ infinitely many points.
459
461
460
462
.. note ::
461
463
@@ -469,7 +471,7 @@ Defines an undirected two-dimensional line by an axis, a minimum and a maximum.
469
471
- **line2 ** - `AxisAlignedLine ` the second line
470
472
- **Return Value ** - `bool, numeric or None ` touching, mtv against 1
471
473
472
- Determines if the two lines are touching, and then returns the
474
+ Determine if the two lines are touching, and then returns the
473
475
minimum translation vector to move line 1 along axis. If the result
474
476
is negative, it means line 1 should be moved in the opposite direction
475
477
of the axis by the magnitude of the result.
@@ -484,11 +486,17 @@ Defines an undirected two-dimensional line by an axis, a minimum and a maximum.
484
486
485
487
- **line ** - `AxisAlignedLine ` the line
486
488
- **point ** - `numeric ` the point
487
- - **Return Value ** - `bool ` if point is contained (or an edge of) the line
489
+ - **Return Value ** - `bool, bool ` if point is contained, if the point is an edge
488
490
489
- Determines if the line contains the specified point, which is assumed
491
+ Determine if the line contains the specified point, which is assumed
490
492
to be defined the same way as min and max.
491
493
494
+ Axis-Aligned Line (autogen)
495
+ ---------------------------
496
+
497
+ .. autoclass :: pygorithm.geometry.AxisAlignedLine
498
+ :members:
499
+
492
500
Concave Polygon
493
501
---------------
494
502
0 commit comments