Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ Windows_task:
- C:\Python\python.exe --version
- C:\Python\python.exe -m pip list

- C:\Python\python.exe -m doctest README.md
- C:\Python\python.exe -m doctest README.md ppb_vector/__init__.py
- C:\Python\python.exe -m pytest --hypothesis-profile ci
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# ppb-vector
The immutable, 2D vector class for the PursuedPyBear project.

`Vector2` implements many convenience features, as well as
`Vector` implements many convenience features, as well as
useful mathematical operations for 2D geometry.

## Install

You can install `Vector2` pip package using
You can install `Vector` pip package using

```bash
pip install 'ppb-vector'
```

## Usage

`Vector2` is an immutable 2D Vector. Instantiated as expected:
`Vector` is an immutable 2D Vector. Instantiated as expected:

>>> from ppb_vector import Vector2
>>> Vector2(3, 4)
Vector2(3.0, 4.0)
>>> from ppb_vector import Vector
>>> Vector(3, 4)
Vector(3.0, 4.0)


See the [online documentation] for an overview of the functionality.
Expand Down
18 changes: 7 additions & 11 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
PPB's 2D Vector class
=====================

.. py:data:: ppb_vector.vector2.Vector
:annotation: = typing.TypeVar('Vector', bound='Vector2')

In the following, :py:data:`Vector` is a type variable (an instance of
:py:class:`TypeVar <typing.TypeVar>`) that denotes either
:py:class:`Vector2` or any of its subclasses. Implicitely, it is the type of
``self``: a method whose return type is :py:data:`Vector` will return a
vector of the same type that it was called on.


.. autoclass:: ppb_vector.Vector2
.. autoclass:: ppb_vector.Vector
:members:
:special-members:
:exclude-members: __init__, __repr__, __weakref__, scale
Expand All @@ -25,3 +15,9 @@ PPB's 2D Vector class
:annotation: : float

The Y coordinate of the vector


Inheriting from :py:class:`Vector`
-----------------------------------

:py:class:`Vector` does not support inheritance.
Loading