Skip to content

Commit

Permalink
Vector2.normalize: Replace redundant display with assert in example
Browse files Browse the repository at this point in the history
  • Loading branch information
nbraud committed Mar 23, 2019
1 parent 8c5e70b commit cdc00a7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ppb_vector/vector2.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,7 @@ def normalize(self: Vector) -> Vector:
Note that :py:meth:`normalize()` is equivalent to :py:meth:`scale(1) <scale>`:
>>> Vector2(7, 24).normalize()
Vector2(0.28, 0.96)
>>> Vector2(7, 24).scale_to(1)
Vector2(0.28, 0.96)
>>> assert Vector2(7, 24).normalize() == Vector2(7, 24).scale_to(1)
"""
return self.scale(1)

Expand Down

0 comments on commit cdc00a7

Please sign in to comment.