[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2D vector code
From: |
Jan Nieuwenhuizen |
Subject: |
Re: 2D vector code |
Date: |
Thu, 13 Apr 2006 17:56:44 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
David Feuer writes:
> My SVG polygon code uses 2D vectors ( (x,y) pairs ) a good bit. Does
> LilyPond already have basic functions (addition, subtraction,
> multiplication by a scalar, dot product, cross product, ...) for
> vectors I can use?
In C++ we have Offset, which has a number of complex_* functions. We
also have complex-to-offset and use offset pairs in SCM, but I do not
know if we have any such functions in SCM.
> If not, I think I should probably write them as a separate module.
Does scm/guile not have such funtions for pairs/complex vectors?
> If I write them as a separate module, should vectors be pairs
> (convenient), or should they be SRFI 9 records (pretty)?
Jan.
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org