Enter a value: 90
Original value: 90
Radian value: 1.5707963267949
Degree value: 90
Quaternion first value: 1
Quaternion first value(in degrees): 57.2957795130823
Quaternion fourth value: 6.12323399573677e-17
Quaternion fourth value(in degrees): 3.50835464926744e-15
####
$ perl -E 'say(4*atan2(1,1) / 2)'
1.5707963267949
####
...
sub pi () { 4 * CORE::atan2(1, 1) }
...
sub cos {
my ($z) = @_ ? @_ : $_;
return CORE::cos($z) unless ref $z;
...
}
...
sub sin {
my ($z) = @_ ? @_ : $_;
return CORE::sin($z) unless ref $z;
...
}
...
####
$ perl -MMath::Complex -E 'say(pi / 2)'
1.5707963267949
####
...->pack(-side=>right);
...
...->pack(-expand=>1, -fill=>x);
####
...->pack(qw{-side right});
...
...->pack(qw{-expand 1 -fill x});
####
use strict;
...
# all strictures on here
{
no strict 'refs';
# 'vars' and 'subs' strictures still on here
...; # <--- minimal code requiring "no strict 'refs'"
}
# all strictures on here
...
####
$ perl -Mwarnings -E 'my @x = qw{1 2 3}; my $y = @x[1]'
Scalar value @x[1] better written as $x[1] at -e line 1.
####
my $qx = @cam_quats[0];
my $qy = @cam_quats[1];
####
my ($qx, $qy) = @cam_quats[0,1];
####
my $cam_ori1 = @cam_ori[0]; # X-orientation
my $cam_ori2 = @cam_ori[1]; # Always 0
my $cam_ori3 = @cam_ori[2]; # Always 0
my $cam_ori4 = @cam_ori[3]; # Y-orientation
# Debugging print-out
print "Orientation:\n\t$cam_ori1\n\t$cam_ori2\n\t$cam_ori3\n\t$cam_ori4\n\n";
# The orientation values are stored as radians, so
# calc_quatcam returns the degree equivalent, or should...
my @cam_quats = calc_quatcam($cam_ori1, $cam_ori4);
####
# Debugging print-out
print join("\n\t", 'Orientation:', @cam_ori[0..3]), "\n\n";
# The orientation values are stored as radians, so
# calc_quatcam returns the degree equivalent, or should...
my @cam_quats = calc_quatcam(@cam_ori[0,3]);