Help for this page

Select Code to Download


  1. or download this
    Enter a value: 90
    Original value: 90
    ...
    Quaternion first value(in degrees):     57.2957795130823
    Quaternion fourth value:     6.12323399573677e-17
    Quaternion fourth value(in degrees):     3.50835464926744e-15
    
  2. or download this
    $ perl -E 'say(4*atan2(1,1) / 2)'
    1.5707963267949
    
  3. or download this
    ...
    sub pi () { 4 * CORE::atan2(1, 1) }
    ...
        ...
    }
    ...
    
  4. or download this
    $ perl -MMath::Complex -E 'say(pi / 2)'
    1.5707963267949
    
  5. or download this
    ...->pack(-side=>right);
    ...
    ...->pack(-expand=>1, -fill=>x);
    
  6. or download this
    ...->pack(qw{-side right});
    ...
    ...->pack(qw{-expand 1 -fill x});
    
  7. or download this
    use strict;
    ...
    ...
    }
    # all strictures on here
    ...
    
  8. or download this
    $ 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.
    
  9. or download this
    my $qx = @cam_quats[0];
    my $qy = @cam_quats[1];
    
  10. or download this
    my ($qx, $qy) = @cam_quats[0,1];
    
  11. or download this
        my $cam_ori1 = @cam_ori[0]; # X-orientation
        my $cam_ori2 = @cam_ori[1]; # Always 0
    ...
        # 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);
    
  12. or download this
        # 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]);