From 91c06344517d0a0d7872b874084fed1351f5e941 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Wed, 4 Feb 2009 20:05:26 -0600 Subject: [PATCH] docs for swizzle --- extra/quadtrees/quadtrees-docs.factor | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extra/quadtrees/quadtrees-docs.factor b/extra/quadtrees/quadtrees-docs.factor index 8240ac5db9..7b0d3772a0 100644 --- a/extra/quadtrees/quadtrees-docs.factor +++ b/extra/quadtrees/quadtrees-docs.factor @@ -10,7 +10,9 @@ ARTICLE: "quadtrees" "Quadtrees" "The following words are provided to help write quadtree algorithms:" { $subsection descend } { $subsection each-quadrant } -{ $subsection map-quadrant } ; +{ $subsection map-quadrant } +"Quadtrees can be used to \"swizzle\" a sequence to improve the locality of spatial data in memory:" +{ $subsection swizzle } ; ABOUT: "quadtrees" @@ -38,3 +40,6 @@ HELP: map-quadrant { $values { "node" quadtree } { "quot" quotation } { "array" array } } { $description "Calls " { $snippet "quot" } " with each subnode of " { $snippet "node" } " on the top of the stack in turn, collecting the four results into " { $snippet "array" } "." } ; +HELP: swizzle +{ $values { "sequence" sequence } { "quot" quotation } { "sequence'" sequence } } +{ $description "Swizzles " { $snippet "sequence" } " based on the two-dimensional vector values returned by calling " { $snippet "quot" } " on each element of " { $snippet "sequence" } "." } ;