Geo::Constants(3pm)

πŸ“¦
version 0.07 Β· 6 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Geo::Constants πŸ’–

okay bestie, come closer β€” this is Geo::Constants, the package where all your standard Geo:: constants live. Yes, the ones you keep redefining in every script like a chaotic little gremlin. No more, we're being organized now. ✨

it's giving "User Contributed Perl Documentation" energy, and honestly? iconic.


🌸 SYNOPSIS 🌸

the whole vibe in two flavors: import-y and object-y. 🫢

  use Geo::Constants qw{PI DEG RAD}; #import into namespace
  print "PI:  ", PI(), "\n";
  print "d/r: ", DEG(), "\n";
  print "r/d: ", RAD(), "\n";

  use Geo::Constants;                #Perl OO
  my $obj = Geo::Constants->new();
  print "PI:  ", $obj->PI, "\n";
  print "d/r: ", $obj->DEG, "\n";
  print "r/d: ", $obj->RAD, "\n";

pick your fighter: functional or OO. both ate. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

bestie... there's literally nothing here. 😭 The section exists, the section is empty, and we respect its main character silence. The constants are all down in FUNCTIONS, go look there. πŸŽ€


πŸ‘‘ CONSTRUCTOR πŸ‘‘

✨ new ✨

The new() constructor. the birth of your object, the origin story, the it's me, hi moment. πŸ¦‹

  my $obj = Geo::Constants->new();

✨ initialize ✨

it's here. it's listed. it has no description. πŸ™ˆ we simply vibe with the mystery.


πŸ’« FUNCTIONS πŸ’«

πŸ“ PI

  my $pi = $obj->PI;

  use Geo::Constants qw{PI};
  my $pi = PI();

it's Ο€. she's famous. she needs no introduction. πŸ’…


πŸ“ DEG

  my $degrees_per_radian = $obj->DEG;

  use Geo::Constants qw{DEG};
  my $degrees_per_radian = DEG();
  • UOM: degrees/radian

πŸ“ RAD

  my $radians_per_degree = $obj->RAD;

  use Geo::Constants qw{DEG};
  my $radians_per_degree = RAD();
  • UOM: radians/degree
ngl, that second snippet really does say use Geo::Constants qw{DEG}; while calling RAD(). We're keeping it exactly as-is, no cap β€” not my business, not my problem, the source said what it said. 🫢

πŸ“ KNOTS

okay so one nautical mile per hour is defined as (1852/3600) m/s, per the United States Department of Commerce, National Institute of Standards and Technology, NIST Special Publication 330, 2001 Edition. πŸ“š citations?? in my constants module?? more likely than you think.

Returns 1852/3600 m/s/knot. πŸ”₯

  • UOM: meters/second per knot

🌈 AUTHOR 🌈

Michael R. Davis β€” the legend, the icon, the moment. πŸ‘‘


πŸ’œ LICENSE πŸ’œ

Copyright (c) 2006-2025 Michael R. Davis ✨

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. fr fr, free as in freedom, slay.


πŸŽ€ SEE ALSO πŸŽ€

  • Geo::Functions
  • Geo::Ellipsoids
  • Astro::Constants

the whole friend group, together at last. iykyk.


and that's the tea, bestie πŸ¦‹ this page is from perl v5.40.0, dated 2025-02-02, and it lives under Geo::Constants(3pm) β€” go forth and never hardcode Ο€ again. πŸ’– πŸŽ€ 🌸

πŸ“¦ where this page comes from