Menu

Point

Nicolas Hainaux
There is a newer version of this page. You can find it here.

This class is used to manipulate Points.

Possible args for __init__():

where the string will be the name of the new Point and (nb, nb) its coordinates.

Fields:

  • x
  • y
  • x_exact
  • y_exact

x and y are the rounded coordinates, since we don't always need an incredible precision when displaying the coordinates. Please note that setting x and y will set the exact values; nevertheless, x and y will still be displayed rounded, to acces the exact value, use x_exact and y_exact

The main method is rotate(center <as Point>, angle <as nb>) which creates a new Point from the rotation of self. The new Point will be named, by default, after the original's name plus a '. It is possible to use keep_name=True to let the name of the new Point be exactly the same, or new_name="H" to name the new Point as wished.

Debugging info: no dbg_str() method so far

Check Point's complete doc

Back


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.