offset_point

Contents

offset_point#

zeroheliumkit.src.utils.offset_point(point: tuple | Point, offset: float, angle: float) Point[source]#

Offsets a point by a given distance and angle.

Parameters:
  • point (tuple or Point) – The point to be offset. Can be a tuple (x, y) or a Point object.

  • offset (float) – The distance by which the point should be offset.

  • angle (float) – The angle (in degrees) at which the point should be offset.

Returns:

A new Point object representing the offset point.

Return type:

Point

Example

>>> result = offset_point((0, 0), 5, 45)
    Point(3.5355339059327378, 3.5355339059327378)