Geo::Constants(3pm)
π 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 sayuse Geo::Constants qw{DEG};while callingRAD(). 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::FunctionsGeo::EllipsoidsAstro::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
- debian trixie: libgeo-constants-perl 0.07-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgeo-constants-perl 0.07-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgeo-constants-perl 0.07-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms