Math::Trig

Trigonometric routines not already built-in

NAME

Math::Trig - Trigonometric routines not already built-in

SYNOPSIS

use Math::Trig;

DESCRIPTION

Subroutines for coverting between degrees, radians, and gradians; converting between different coordinate systems (cartesian, spherical, cylindrical); and great circle formulas.

SUBROUTINES

Available with use Math::Trig;

  • sub rad2rad($rad)

  • sub deg2deg($deg)

  • sub grad2grad($grad)

  • sub rad2deg($rad)

  • sub deg2rad($deg)

  • sub grad2deg($grad)

  • sub deg2grad($deg)

  • sub rad2grad($rad)

  • sub grad2rad($grad)

  • sub cartesian-to-spherical(y,$z)

Available with use Math::Trig :radial;

  • sub spherical-to-cartesian(theta, $phi)

  • sub spherical-to-cylindrical(theta, $phi)

  • sub cartesian-to-cylindrical(y,$z)

  • sub cylindrical-to-cartesian(theta, $z)

  • sub cylindrical-to-spherical(theta, $phi)

Available with use Math::Trig :great-circle;

  • sub great-circle-distance(phi0, phi1, $rho = 1)

  • sub great-circle-direction(phi0, phi1)

  • sub great-circle-bearing(phi0, phi1)

  • sub great-circle-waypoint(phi0, phi1, $point = 0.5)

  • sub great-circle-midpoint(phi0, phi1)

  • sub great-circle-destination(phi0, dst)

BUGS

  • This is a work in progress. Caveat emptor.

  • Perhaps rename this module since it's less about trigonometry and more about angular conversions and great circles?

AUTHOR

Jonathan Scott Duff

Source can be located at: https://github.com/raku-community-modules/Math-Trig . Comments and Pull Requests are welcome.

ACKNOWLEDGEMENTS

This module is shamelessly based on the Perl module of the same name. Without the authors and maintainers of that module, this module wouldn't exist in this form.

COPYRIGHT AND LICENSE

Copyright 2015 - 2017 Jonathan Scott Duff

Copyright 2018 - 2022 Raku Community

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Math::Trig v0.0.3

Trigonometric routines not already built-in

Authors

    License

    Artistic-2.0

    Dependencies

    Test Dependencies

    Provides

    • Math::Trig

    The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.