Skip to main content

vectors and points by Charawi Detphumi

Project description

cos202finalbycharawi is a Python library for dealing with points and vectors.

Installation

Use the package manager pip to install cos202finalbycharawi.

pip install cos202finalbycharawi

Usage

from cos202finalbycharawi import Vector

v1 = Vector(1,2)
  v2 = Vector(3,4)
  print(v1)
  print(v2)
  v1.euclideandistance(v2)
  print(v1.lenght())
  print(v1.unit())
  print(v1.dotproduct(v2))
  #print(v1.crossproduct(v2))
  print(v1+v2)
  print(v1-v2)
  print(v1*v2)
  print(v1/v2)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Author

Charawi Detphumi

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cos202finalbycharawi-0.0.2.tar.gz (3.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page