Wolfram Research

Function Repository Resource:

ComplementaryAngle

Source Notebook

Compute the geometric complement to a given angle

Contributed by: Paco Jain (Wolfram Research)

ResourceFunction["ComplementaryAngle"][θ]

gives the complement to the angle of θ.

Details and Options

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

Examples

Basic Examples

Compute the complement of an angle:

In[1]:=
ResourceFunction["ComplementaryAngle"][Pi/3]
Out[1]=

Scope

ComplementaryAngle works directly on Quantity expressions with units of “Radians”:

In[2]:=
ResourceFunction["ComplementaryAngle"][Quantity[1, "Radians"]]
Out[2]=

Properties and Relations

ComplementaryAngle will remain unevaluated for non-numeric input:

In[3]:=
ResourceFunction["ComplementaryAngle"][a]
Out[3]=

ComplementaryAngle will return a negative result if the input angle is greater than :

In[4]:=
ResourceFunction["ComplementaryAngle"][2.7]
Out[4]=

For negative input, ComplementaryAngle returns a result greater than :

In[5]:=
ResourceFunction["ComplementaryAngle"][-1.2]
Out[5]=

For numeric input, ComplementaryAngle is its own inverse:

In[6]:=
r = RandomReal[];
ResourceFunction["ComplementaryAngle"][
  ResourceFunction["ComplementaryAngle"][r]] == r
Out[7]=

Resource History

See Also

License Information