Function Repository Resource:

ComplementaryAngleDegree

Source Notebook

Compute the geometric complement to a given angle using degrees

Contributed by: Paco Jain (Wolfram Research)

ResourceFunction["ComplementaryAngleDegree"][θ]

gives the complement to the angle of θ in degrees.

Details and Options

ResourceFunction["ComplementaryAngleDegree"] takes all angles to be measured in degrees.
The complement of an angle θ is defined to be the angle which sums with θ to form a right angle. In other words, 90°-θ.

Examples

Basic Examples (1) 

Compute the complement of an angle:

In[1]:=
ResourceFunction["ComplementaryAngleDegree"][35]
Out[1]=

Scope (3) 

ComplementaryAngleDegree works directly on Quantity expressions with units of "AngularDegrees":

In[2]:=
ResourceFunction["ComplementaryAngleDegree"][
 Quantity[14, "AngularDegrees"]]
Out[2]=

ComplementaryAngleDegree works directly on DMS lists of the type returned by DMSList:

In[3]:=
dmsList = DMSList[87.32]
Out[3]=
In[4]:=
ResourceFunction["ComplementaryAngleDegree"][dmsList]
Out[4]=

ComplementaryAngleDegree works directly on DMS strings of the type returned by DMSString:

In[5]:=
dmsString = DMSString[63.19]
Out[5]=
In[6]:=
ResourceFunction["ComplementaryAngleDegree"][dmsString]
Out[6]=

Properties and Relations (4) 

ComplementaryAngleDegree will remain unevaluated for non-numeric input:

In[7]:=
ResourceFunction["ComplementaryAngleDegree"][a]
Out[7]=

ComplementaryAngleDegree will return a negative result if the input angle is greater than 90°:

In[8]:=
ResourceFunction["ComplementaryAngleDegree"][120]
Out[8]=

For negative input, ComplementaryAngleDegree returns a result greater than 90°:

In[9]:=
ResourceFunction["ComplementaryAngleDegree"][-46]
Out[9]=

For numeric input, ComplementaryAngleDegree is its own inverse:

In[10]:=
r = RandomReal[{0, 360}];
ResourceFunction["ComplementaryAngleDegree"][
  ResourceFunction["ComplementaryAngleDegree"][r]] == r
Out[11]=

Version History

  • 1.0.0 – 05 July 2019

Related Resources

License Information