-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add utilities for vector magnitude and normalisation (#243)
* added utility for vector magnitude * added utility for normalising vectors * use magnitude utility in kinematics example * use `magnitude` in `cart2pol` * reorder functions in vector.py * rename `magnitude` to `compute_norm` * define normalisation in polar coordinates too * Update comment phrasing Co-authored-by: sfmig <[email protected]> * generalise assertion about null vector normalisation * renamed `normalize` to `convert_to_unit` * extend test for conversion to unit vectors * refactor erro raising into separate func --------- Co-authored-by: sfmig <[email protected]>
- Loading branch information
Showing
3 changed files
with
176 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters