Making a Point Class in Python

前端 未结 4 1991
旧时难觅i
旧时难觅i 2020-12-17 05:28

I am trying to create a class in python titled \"Point.\" I am trying to create a point on a coordinate plane x and y and track them. As well as find the distance between th

4条回答
  •  误落风尘
    2020-12-17 06:11

    Hum, why not use complex instead of a point class? It has all the properties you are searching for and more (such as rotation).

    Here is an example to "OOP" the complex with a pedantic notation:

    https://gist.github.com/jul/9286835

提交回复
热议问题