Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Returns a string with the closest (inter)cardinal direction
ResourceFunction["CompassPoint"][b] returns a string for the bearing b from an 8-wind compass rose. | |
ResourceFunction["CompassPoint"][b,n] returns a string for the bearing b from an n-wind compass rose, where n= 4, 8, 16 or 32. |
Create a string representation of an 51° bearing on an 8 point wind rose:
In[1]:= | ![]() |
Out[1]= | ![]() |
Use a 32-point wind rose:
In[2]:= | ![]() |
Out[2]= | ![]() |
Use a degree Quantity instead:
In[3]:= | ![]() |
Out[3]= | ![]() |
Negative angles are allowed and equivalent to their positive angle by adding 360°:
In[4]:= | ![]() |
Out[4]= | ![]() |
Each sector has two borders, the border in the clockwise direction belong to the sector, the other border to the previous section:
In[5]:= | ![]() |
Out[5]= | ![]() |
Make a compass:
In[6]:= | ![]() |
Out[6]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License