]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/colors/hwb/hwb.factor
factor: trim using lists
[factor.git] / basis / colors / hwb / hwb.factor
index 66efc803712c13703fbec5532cbdb97aa67be5b8..13c30170fd40c04b8203d85abb15526ae9306dba 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license
 
 USING: accessors colors colors.gray colors.hsl combinators
-kernel locals math math.order ;
+kernel math math.order ;
 
 IN: colors.hwb
 
@@ -16,20 +16,6 @@ C: <hwba> hwba
 
 INSTANCE: hwba color
 
-<PRIVATE
-
-: value ( p q t -- value )
-    dup 0 < [ 1.0 + ] when
-    dup 1 > [ 1.0 - ] when
-    {
-        { [ dup 1/6 < ] [ [ over - ] dip * 6 * + ] }
-        { [ dup 1/2 < ] [ drop nip ] }
-        { [ dup 2/3 < ] [ [ over - ] dip 2/3 swap - * 6 * + ] }
-        [ 2drop ]
-    } cond ;
-
-PRIVATE>
-
 M: hwba >rgba
     [let
         {