Point.pm 552 B

123456789101112131415161718192021222324252627282930313233
  1. package Slic3r::Point;
  2. use strict;
  3. use warnings;
  4. sub new_scale {
  5. my $class = shift;
  6. return $class->new(map Slic3r::Geometry::scale($_), @_);
  7. }
  8. sub dump_perl {
  9. my $self = shift;
  10. return sprintf "[%s,%s]", @$self;
  11. }
  12. package Slic3r::Pointf;
  13. use strict;
  14. use warnings;
  15. sub new_unscale {
  16. my $class = shift;
  17. return $class->new(map Slic3r::Geometry::unscale($_), @_);
  18. }
  19. package Slic3r::Pointf3;
  20. use strict;
  21. use warnings;
  22. sub new_unscale {
  23. my $class = shift;
  24. return $class->new(map Slic3r::Geometry::unscale($_), @_);
  25. }
  26. 1;