Post Reply 
Collaborative collection of useful userRPL snippets
03-27-2018, 02:58 PM (This post was last modified: 03-27-2018 03:06 PM by peacecalc.)
Post: #12
RE: Collaborative collection of useful userRPL snippets
Hello Paul,

why you don't like to use that expression for finding the angle between to vectors?

\[ angle between(\vec{v}_1,\vec{v}_2)= arccos\left(\frac{\vec{v}_1 \cdot \vec{v}_2}{|\vec{v}_1 || \vec{v}_2|}\right) \].

It is brutal force... but in RPL it is easy to manage:

Code:
<< \-> v1 v2 
    << v1 v2 DOT v1 ABS / v2 ABS / ACOS >>
>>

Sorry I forgot if the angle is greater than 90 degrees (or pi/2) then take 180 degrees minus the result above (or pi - result).
Double sorry, I've now understand your display task in your last post.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Collaborative collection of useful userRPL snippets - peacecalc - 03-27-2018 02:58 PM



User(s) browsing this thread: 1 Guest(s)