charts.lines: rename search-index to search-first

char-rename
Alexander Iljin 2017-01-10 23:06:33 +03:00 committed by John Benediktsson
parent e9606b38d9
commit 418b798460
1 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ TUPLE: line < gadget color data ;
: (line-vertices) ( seq -- vertices ) : (line-vertices) ( seq -- vertices )
concat [ 0.3 + ] float-array{ } map-as ; concat [ 0.3 + ] float-array{ } map-as ;
: search-index ( elt seq -- index elt ) : search-first ( elt seq -- index elt )
[ first <=> ] with search ; [ first <=> ] with search ;
: finder ( elt seq -- seq quot ) : finder ( elt seq -- seq quot )
@ -53,8 +53,8 @@ TUPLE: line < gadget color data ;
: clip-by-first ( min,max pairs -- pairs' ) : clip-by-first ( min,max pairs -- pairs' )
2dup first-in-bounds? [ 2dup first-in-bounds? [
[ dup first ] dip [ search-index ] keep adjusted-tail [ dup first ] dip [ search-first ] keep adjusted-tail
[ second ] dip [ search-index ] keep adjusted-head [ second ] dip [ search-first ] keep adjusted-head
] [ ] [
2drop { } clone 2drop { } clone
] if ; ] if ;