Skip to content

Commit ee4a18a

Browse files
committed
non-Euclid use fields properly
1 parent ccdb111 commit ee4a18a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

lib/PDL/Graphics/TriD/Graph.pm

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,16 @@ sub add_lattice_axis {
229229
package # hide from PAUSE
230230
PDL::Graphics::TriD::CylindricalEquidistantAxes;
231231
use base qw(PDL::Graphics::TriD::LatticeAxes);
232-
use fields qw(Names Scale);
232+
use fields qw(Names Scale Center);
233233
use PDL::Core '';
234234
use PDL::Constants qw(DEGRAD);
235235
use constant DEG2RAD => 1/DEGRAD;
236236

237237
sub new {
238238
my ($type) = @_;
239-
bless {Names => [qw(LON LAT Pressure)]},$type;
239+
my $self = $type->SUPER::new;
240+
$self->{Names} = [qw(LON LAT Pressure)];
241+
$self;
240242
}
241243

242244
sub init_scale {
@@ -317,14 +319,16 @@ sub transform {
317319
package # hide from PAUSE
318320
PDL::Graphics::TriD::PolarStereoAxes;
319321
use base qw(PDL::Graphics::TriD::LatticeAxes);
320-
use fields qw(Names Scale);
322+
use fields qw(Names Scale Center);
321323
use PDL::Core '';
322324
use PDL::Constants qw(DEGRAD);
323325
use constant DEG2RAD => 1/DEGRAD;
324326

325327
sub new {
326328
my ($type) = @_;
327-
bless {Names => [qw(LONGITUDE LATITUDE HEIGHT)]},$type;
329+
my $self = $type->SUPER::new;
330+
$self->{Names} = [qw(LONGITUDE LATITUDE HEIGHT)];
331+
$self;
328332
}
329333

330334
sub init_scale {

0 commit comments

Comments
 (0)