MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / setXY

Method setXY

src/org/opensourcephysics/media/core/TVector.java:155–161  ·  view source on GitHub ↗

Overrides TPoint setXY method to move both tip and tail. @param x the x position @param y the y position

(double x, double y)

Source from the content-addressed store, hash-verified

153 * @param y the y position
154 */
155 @Override
156public void setXY(double x, double y) {
157 double dx = x-getX();
158 double dy = y-getY();
159 tip.translate(dx, dy);
160 tail.translate(dx, dy);
161 }
162
163 /**
164 * Enables and disables the interactivity of the tip.

Callers

nothing calls this directly

Calls 3

getXMethod · 0.65
getYMethod · 0.65
translateMethod · 0.45

Tested by

no test coverage detected