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

Method setXY

src/org/opensourcephysics/media/core/TLine.java:112–118  ·  view source on GitHub ↗

Sets the x and y positions in imagespace. @param x the x position @param y the y position

(double x, double y)

Source from the content-addressed store, hash-verified

110 * @param y the y position
111 */
112 @Override
113public void setXY(double x, double y) {
114 double dx = x-getX();
115 double dy = y-getY();
116 end1.translate(dx, dy);
117 end2.translate(dx, dy);
118 }
119
120 /**
121 * Returns the interactive drawable object at the specified pixel

Callers

nothing calls this directly

Calls 3

getXMethod · 0.65
getYMethod · 0.65
translateMethod · 0.45

Tested by

no test coverage detected