PDL::Constants#

basic compile time constants for PDL

DESCRIPTION#

This module is used to define compile time constant values for PDL. It uses Perl’s constant pragma for simplicity and availability.

SYNOPSIS#

use PDL::Constants qw(PI E);
print 'PI is ' . PI . "\n";
print 'E  is ' .  E . "\n";

PI#

The ratio of a circle’s circumference to its diameter

DEGRAD#

The number of degrees of arc per radian (180/PI)

DEG2RAD#

The constant to convert degrees of arc into radians (PI/180)

$radians = DEG2RAD * $degrees;

RAD2DEG#

The constant to convert radians into degrees of arc (180/PI)

$degrees = RAD2DEG * $radians;

E#

The base of the natural logarithms or Euler’s number