[b69cf9]: t / 031.matrix.t  Maximize  Restore  History

Download this file

28 lines (18 with data), 563 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/perl
#Editor vim:syn=perl
use strict;
use warnings;
use Test::More 'no_plan';
use Math::Trig;
use lib 'lib';
use Panotools::Matrix qw(rollpitchyaw2matrix matrix2rollpitchyaw);
# 0, 45, 0
my $pitch45 = rollpitchyaw2matrix (map (deg2rad ($_),(0, -45, 0)));
# 5, -5, 10
my $foo = rollpitchyaw2matrix (map (deg2rad ($_),(5, -5, 10)));
my $result = $pitch45->multiply ($foo);
my @rpy = matrix2rollpitchyaw ($result);
@rpy = map (rad2deg ($_), @rpy);
like ($rpy[0], '/-5.79921896/');
like ($rpy[1], '/-49.0553302/');
like ($rpy[2], '/15.3057553/');

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks