Skip to content

Add a convenient way to set (mutate) the value of a Point #86

@davjhan

Description

@davjhan

Currently, if I have a circle, there is no way to change the origin of the point to a given point.

There is translate(Point) and shift(x,y), but translate just invokes shift, and it moves the point, not sets it at the new point.

The current solution is to use the verbose constructor and go myCircle = new Circle(new Point(x,y),myCircle.radius).

Either offer a new interface method like Circle.setOrigin(Point) or Circle.setOrigin(x,y) or offer a Point.set(x,y) which will mutate the x and y variables in place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions