]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/rosetta-code/bitmap-line/bitmap-line.factor
factor: trim using lists
[factor.git] / extra / rosetta-code / bitmap-line / bitmap-line.factor
index 18d96ce0bd9dbdb73412d9e32a00f9f61cffc481..5153ec1365352a24b98dd2b5a5a93b2d64e298ca 100644 (file)
@@ -1,8 +1,6 @@
 ! Copyright (c) 2012 Anonymous
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays kernel locals math math.functions
-math.ranges math.vectors rosetta-code.bitmap sequences
-ui.gadgets ;
+USING: arrays kernel math ranges rosetta-code.bitmap sequences ;
 IN: rosetta-code.bitmap-line
 
 ! http://rosettacode.org/wiki/Bitmap/Bresenham%27s_line_algorithm
@@ -31,8 +29,8 @@ IN: rosetta-code.bitmap-line
     y0 :> y!
     y0 y1 < [ 1 ystep! ] [ -1 ystep! ] if
     x0 x1 1 <range> [
-        y steep [ swap ] when 2array  
-        current-error deltaerr + current-error! 
+        y steep [ swap ] when 2array
+        current-error deltaerr + current-error!
         current-error 0.5 >= [
             ystep y + y!
             current-error 1 - current-error!