From a4a1ea6e2f386d023b4cad05300100507ad91da2 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" <wking@drexel.edu> Date: Wed, 12 Aug 2009 06:58:08 -0400 Subject: [PATCH] Added centerto() function to Circ.asy. Syntax is easier than using the .centerto() method when centering one TwoTerminal on another. --- asymptote/Circ.asy | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/asymptote/Circ.asy b/asymptote/Circ.asy index 268f39f..abfe424 100644 --- 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; -- 2.26.2