Bird

Standard Library

Bird's standard library is composed of namespaces that may include nested namespaces.

Math::Trig

Contains a variety of trigonometry related modules.

cos(b: float, c: float) -> float

Returns the cosine of the angle opposite side a in a triangle. Requires side lengths b and c.

sin(a: float, c: float) -> float

Returns the sine of the angle opposite side b in a triangle. Requires side length a and the hypotenuse c.

tan(a: float, b: float) -> float

Returns the tangent of the angle formed by the opposite side a and adjacent side b in a right triangle.

arccos(x: float) -> float

Returns the arccosine (inverse cosine) of x in radians. x must be in the range [-1, 1].

arcsin(x: float) -> float

Returns the arcsine (inverse sine) of x in radians. x must be in the range [-1, 1].

arctan(x: float) -> float

Returns the arctangent (inverse tangent) of x in radians.

to_degrees(theta: float) -> float

Converts the angle theta from radians to degrees.

struct Triangle{a: float, b: float, c: float}

Defines a triangle with side lengths a, b, and c. Can be used for performing geometric and trigonometric calculations.

Still here?

Check out the playground!