projects
/
course.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
663d2cc
)
Added centerto() function to Circ.asy.
author
W. Trevor King
<wking@drexel.edu>
Wed, 12 Aug 2009 10:58:08 +0000
(06:58 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Thu, 17 Sep 2009 16:49:59 +0000
(12:49 -0400)
Syntax is easier than using the .centerto() method when centering one
TwoTerminal on another.
asymptote/Circ.asy
patch
|
blob
|
history
diff --git
a/asymptote/Circ.asy
b/asymptote/Circ.asy
index 268f39f032a9034f65b3a63ab7692fdb7b021f7f..abfe42430dcd028dee02267c7df800307e400314 100644
(file)
--- a/
asymptote/Circ.asy
+++ b/
asymptote/Circ.asy
@@
-264,6
+264,15
@@
struct TwoTerminal {
}
}
+void centerto(TwoTerminal reference, TwoTerminal target, real offset=0,
+ bool reverse=false)
+{
+ if (reverse == false)
+ target.centerto(reference.beg, reference.end, offset);
+ else
+ target.centerto(reference.end, reference.beg, offset);
+}
+
// --- Resistor (Resistencia) ---
real rstlth=2mm;