]> iEval git - convert-color-hsluv.git/blobdiff - lib/Convert/Color/LCh.pm
Bump copyright
[convert-color-hsluv.git] / lib / Convert / Color / LCh.pm
index 83cf1bf6fa0945ec1fb50385cd05c08b279821cd..296e2dda7be3a716a05f11bdec292c768a5c6289 100644 (file)
@@ -1,11 +1,11 @@
 package Convert::Color::LCh;
 
-use 5.014000;
+use 5.008009;
 use strict;
 use warnings;
 use parent qw/Convert::Color/;
 
-our $VERSION = '0.001';
+our $VERSION = '1.000';
 
 use Convert::Color::LUV;
 use Math::Trig ':pi';
@@ -37,6 +37,7 @@ sub new_from_luv {
        my ($class, $luv) = @_;
        my ($l, $u, $v) = @$luv;
        my $c = sqrt $u * $u + $v * $v;
+       return $class->new($l, $c, 0) if $c < 0.00000001;
        my $hrad = atan2 $v, $u;
        my $h = $hrad * 180 / pi;
        $h += 360 if $h < 0;
@@ -110,7 +111,7 @@ Marius Gavrilescu, E<lt>marius@ieval.roE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright (C) 2015 by Marius Gavrilescu
+Copyright (C) 2015-2017 by Marius Gavrilescu
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself, either Perl version 5.20.2 or,
This page took 0.025265 seconds and 4 git commands to generate.