From 83251c80832f3170623231fe30536cad3f1fec54 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 11 Apr 2012 17:27:14 -0400 Subject: [PATCH] (pTo - pFrom) makes more sense for label alignment in Mechanics.asy. --- asymptote/Mechanics-test.asy | 2 +- asymptote/Mechanics.asy | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asymptote/Mechanics-test.asy b/asymptote/Mechanics-test.asy index e0017bd..7dd1264 100644 --- a/asymptote/Mechanics-test.asy +++ b/asymptote/Mechanics-test.asy @@ -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), diff --git a/asymptote/Mechanics.asy b/asymptote/Mechanics.asy index cd7fb49..a98bcd2 100644 --- a/asymptote/Mechanics.asy +++ b/asymptote/Mechanics.asy @@ -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)); -- 2.26.2