Drop minimum perl version from 5.14.0 to 5.8.9
[convert-color-husl.git] / lib / Convert / Color / LCh.pm
index 83cf1bf6fa0945ec1fb50385cd05c08b279821cd..f52ee458c3e2a37eed1ada60d0a5cad4b5e1e12f 100644 (file)
@@ -1,6 +1,6 @@
 package Convert::Color::LCh;
 
-use 5.014000;
+use 5.008009;
 use strict;
 use warnings;
 use parent qw/Convert::Color/;
@@ -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;
This page took 0.00973 seconds and 4 git commands to generate.