(pTo - pFrom) makes more sense for label alignment in Mechanics.asy.
authorW. Trevor King <wking@drexel.edu>
Wed, 11 Apr 2012 21:27:14 +0000 (17:27 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 11 Apr 2012 21:27:14 +0000 (17:27 -0400)
asymptote/Mechanics-test.asy
asymptote/Mechanics.asy

index e0017bdf6686aae852a1155403b472b27813cbbe..7dd126496b35e42e3b304372741514fb06b96b87 100644 (file)
@@ -83,7 +83,7 @@ Pendulum p = makePendulum(
 
 real len = abs(p.pivot.x-b.center().x);
 Spring s = Spring(
-    pFrom=b.center(), pTo=b.center()-(2u,0), L=Label("$k_1$", align=N));
+    pFrom=b.center()-(2u,0), b.center(), L=Label("$k_1$", align=N));
 s.draw();
 s = Spring(
     pFrom=b.center(), pTo=(p.pivot.x, b.center().y+0.5u),
index cd7fb4929226f959d5443bf43ae6c138c5cbd4b9..a98bcd276a423f884ca5da3a07d0d3bb463224a4 100644 (file)
@@ -338,7 +338,7 @@ struct Distance {
     draw(pic, p, outline, Arrows);
     embed e = this.label.embed;
     if (this.label.embed == Rotate) {
-      this.label.embed = Rotate(this.pFrom - this.pTo);
+      this.label.embed = Rotate(this.pTo - this.pFrom);
     }
     label(pic=pic, L=this.label, g=p);
     this.label.embed = e;
@@ -434,7 +434,7 @@ struct Wire {
     draw(pic, p, outline);
     embed e = this.label.embed;
     if (this.label.embed == Rotate) {
-      this.label.embed = Rotate(this.pFrom - this.pTo);
+      this.label.embed = Rotate(this.pTo - this.pFrom);
     }
     label(pic=pic, L=this.label, g=p);
     this.label.embed = e;
@@ -471,7 +471,7 @@ struct Surface {
     draw(pic, p, outline);
     embed e = this.label.embed;
     if (this.label.embed == Rotate) {
-      this.label.embed = Rotate(this.pFrom - this.pTo);
+      this.label.embed = Rotate(this.pTo - this.pFrom);
     }
     label(pic=pic, L=this.label,
         g=(this.pFrom+pDepth/2) -- (this.pTo+pDepth/2));