You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could associate instances of the Angle class with
vector spaces, by also moving the 'direction' and 'e' functions into
the Angle class. That is, an angle is anything which can be obtained
from a vector, and converted back to a unit vector, subject to the
laws
(1) forall a, magnitude (e a) == 1
(e always produces unit vectors)
(2) direction . e === id
(converting from an angle to a vector and back is the identity)
(3) forall v,
exists k >= 0, v == k *^ (e . direction) v
(converting from a vector to an angle and back results in a
positive scalar multiple of the original vector)
Perhaps the class should be called Direction instead of Angle.
In any case, it's not clear to me whether this would be cool or whether it would just make things too complicated. It would be nice to be able to directly provide a vector when a direction is wanted, and to be able to talk about directions in dimensions other than two; but the downsides aren't (yet) clear to me.
The first step is probably just to do a thorough analysis of what would be affected by such a change, along with some examples of its utility.
The text was updated successfully, but these errors were encountered:
(Imported from http://code.google.com/p/diagrams/issues/detail?id=84. Original issue from byor...@gmail.com on June 10, 2012, 06:29:18 PM UTC)
We could associate instances of the Angle class with
vector spaces, by also moving the 'direction' and 'e' functions into
the Angle class. That is, an angle is anything which can be obtained
from a vector, and converted back to a unit vector, subject to the
laws
(1) forall a, magnitude (e a) == 1
(2) direction . e === id
(3) forall v,
exists k >= 0, v == k *^ (e . direction) v
Perhaps the class should be called Direction instead of Angle.
In any case, it's not clear to me whether this would be cool or whether it would just make things too complicated. It would be nice to be able to directly provide a vector when a direction is wanted, and to be able to talk about directions in dimensions other than two; but the downsides aren't (yet) clear to me.
The first step is probably just to do a thorough analysis of what would be affected by such a change, along with some examples of its utility.
The text was updated successfully, but these errors were encountered: