Skip to content

Commit 4df97f1

Browse files
committed
use inplace norm, outer
1 parent dfe594d commit 4df97f1

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Makefile.PL

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ WriteMakefile (
1313
VERSION_FROM => 'lib/PDL/Graphics/TriD.pm',
1414
CONFIGURE_REQUIRES => {
1515
'ExtUtils::MakeMaker' => '7.72',
16-
'PDL' => '2.103',
16+
'PDL' => '2.104',
1717
},
1818
PREREQ_PM => {
19-
'PDL' => '2.103', # allaxislinvals, fixed *linvals
19+
'PDL' => '2.104', # inplace norm
2020
'OpenGL::Modern' => '0.0403',
2121
'OpenGL::GLFW' => '0.0402',
2222
},

lib/PDL/Graphics/TriD/Quaternion.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ sub as_matrix {
136136
my ($this) = @_;
137137
my ($rot, $vec) = map PDL->pdl(PDL::float, $_), $this->[0], [@$this[1..3]];
138138
$rot->inplace->acos; $rot *= 2;
139-
$vec = $vec->norm;
140-
my $uuT = $vec->t * $vec;
139+
$vec->inplace->norm;
140+
my $uuT = $vec->outer($vec);
141141
my ($cos, $sin) = map $rot->$_, qw(cos sin);
142142
my ($x, $y, $z) = $vec->list;
143143
my $S = PDL->pdl(PDL::float,

0 commit comments

Comments
 (0)