var searchIndex = {}; searchIndex["hex2d"] = {"doc":"Hexagonal map operations utility library","items":[[3,"Coordinate","hex2d","Coordinate on 2d hexagonal grid",null,null],[12,"x","","`x` coordinate",0,null],[12,"y","","`y` coordinate",0,null],[3,"Position","","Position on 2d hexagonal grid (Coordinate + Direction)",null,null],[12,"coord","","`x` coordinate",1,null],[12,"dir","","`y` coordinate",1,null],[4,"Direction","","Direction on a hexagonal map",null,null],[13,"YZ","","+Y -Z",2,null],[13,"XZ","","-Z +X",2,null],[13,"XY","","+X -Y",2,null],[13,"ZY","","-Y +Z",2,null],[13,"ZX","","+Z -X",2,null],[13,"YX","","-X +Y",2,null],[4,"Angle","","Angle, relative to a Direction",null,null],[13,"Forward","","0deg clockwise",3,null],[13,"Right","","60deg clockwise",3,null],[13,"RightBack","","120deg clockwise",3,null],[13,"Back","","180deg clockwise",3,null],[13,"LeftBack","","240deg clockwise",3,null],[13,"Left","","300deg clockwise",3,null],[4,"Spin","","Spinning directions",null,null],[13,"CW","","Clockwise",4,null],[13,"CCW","","Counterclockwise",4,null],[4,"Spacing","","Floating point tile size for pixel conversion functions",null,null],[13,"FlatTop","","Hex-grid with an edge on top",5,null],[13,"PointyTop","","Hex-grid with a corner on top",5,null],[4,"IntegerSpacing","","Integer pixel tile size for integer pixel conversion functions",null,null],[13,"FlatTop","","Hex-grid with an edge on top",6,null],[13,"PointyTop","","Hex-grid with a corner on top",6,null],[8,"Integer","","Integer trait required by this library",null,null],[8,"ToCoordinate","","Can be treated as a `Coordinate`",null,null],[10,"to_coordinate","","Convert to `Coordinate` part of this data",7,null],[8,"ToDirection","","Can be treated as a `Direction`",null,null],[10,"to_direction","","Convert to `Angle` part of this data",8,null],[11,"decode","","",0,{"inputs":[{"name":"__di"}],"output":{"name":"result"}}],[11,"partial_cmp","","",0,null],[11,"lt","","",0,null],[11,"le","","",0,null],[11,"gt","","",0,null],[11,"ge","","",0,null],[11,"cmp","","",0,null],[11,"fmt","","",0,null],[11,"hash","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"clone","","",0,null],[11,"decode","","",1,{"inputs":[{"name":"__di"}],"output":{"name":"result"}}],[11,"partial_cmp","","",1,null],[11,"lt","","",1,null],[11,"le","","",1,null],[11,"gt","","",1,null],[11,"ge","","",1,null],[11,"cmp","","",1,null],[11,"fmt","","",1,null],[11,"hash","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"clone","","",1,null],[11,"decode","","",2,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"partial_cmp","","",2,null],[11,"cmp","","",2,null],[11,"fmt","","",2,null],[11,"hash","","",2,null],[11,"eq","","",2,null],[11,"clone","","",2,null],[11,"decode","","",3,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"partial_cmp","","",3,null],[11,"cmp","","",3,null],[11,"fmt","","",3,null],[11,"hash","","",3,null],[11,"eq","","",3,null],[11,"clone","","",3,null],[11,"decode","","",4,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"partial_cmp","","",4,null],[11,"lt","","",4,null],[11,"le","","",4,null],[11,"gt","","",4,null],[11,"ge","","",4,null],[11,"cmp","","",4,null],[11,"fmt","","",4,null],[11,"hash","","",4,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"clone","","",4,null],[11,"decode","","",5,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"partial_cmp","","",5,null],[11,"lt","","",5,null],[11,"le","","",5,null],[11,"gt","","",5,null],[11,"ge","","",5,null],[11,"fmt","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"clone","","",5,null],[11,"decode","","",6,{"inputs":[{"name":"__di"}],"output":{"name":"result"}}],[11,"partial_cmp","","",6,null],[11,"lt","","",6,null],[11,"le","","",6,null],[11,"gt","","",6,null],[11,"ge","","",6,null],[11,"cmp","","",6,null],[11,"hash","","",6,null],[11,"fmt","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"clone","","",6,null],[11,"new","","Create new Coord from `x` and `y`",0,{"inputs":[{"name":"i"},{"name":"i"}],"output":{"name":"coordinate"}}],[11,"scale","","Scale coordinate by a factor `s`",0,null],[11,"from_round","","Round x, y float to nearest hex coordinates",0,{"inputs":[{"name":"f32"},{"name":"f32"}],"output":{"name":"coordinate"}}],[11,"from_round_lossy","","Round x, y float to nearest hex coordinates",0,{"inputs":[{"name":"f32"},{"name":"f32"}],"output":{"name":"option"}}],[11,"for_each_in_line_to","","Execute `f` for each coordinate in straight line from `self` to `dest`",0,null],[11,"for_each_in_line_to_lossy","","Execute `f` for each coordinate in straight line from `self` to `dest`",0,null],[11,"for_each_in_line_to_with_edge_detection","","Execute `f` for pairs of coordinates in straight line from `self` to `dest`",0,null],[11,"line_to","","Construct a straight line to a `dest`",0,null],[11,"line_to_lossy","","Construct a straight line to a `dest`",0,null],[11,"line_to_with_edge_detection","","Construct a straight line to a `dest`",0,null],[11,"z","","Z coordinate",0,null],[11,"direction_from_center_cw","","Direction from center `(0, 0)` to coordinate",0,null],[11,"direction_from_center_ccw","","Direction from center `(0, 0)` to coordinate",0,null],[11,"direction_to_cw","","Direction from self to `coord`",0,null],[11,"direction_to_ccw","","Direction from self to `coor`",0,null],[11,"neighbors","","Array with all the neighbors of a coordinate",0,null],[11,"distance","","Distance between two Coordinates",0,null],[11,"range","","All coordinates in radius `r`",0,null],[11,"for_each_in_range","","Execute `f` for all coordinates in radius `r`",0,null],[11,"ring","","A ring of radius `r`, starting in a corner in a given Direction",0,null],[11,"for_each_in_ring","","Call `f` for each coordinate in a ring",0,null],[11,"to_pixel_float","","Convert to pixel coordinates using `spacing`, where the\nparameter means the edge length of a hexagon.",0,null],[11,"to_pixel_integer","","Convert to integer pixel coordinates using `spacing`, where the\nparameters mean the width and height multiplications",0,null],[11,"from_pixel_integer","","Convert integer pixel coordinates `v` using `spacing` to nearest coordinate that has both\ninteger pixel coordinates lower or equal to `v`. Also return offset (in integer pixels)\nfrom that coordinate.",0,null],[11,"rotate_around_zero","","Rotate self around a point `(0, 0, 0)` using angle of rotation `a`",0,null],[11,"rotate_around","","Rotate `self` around a `center` using angle of rotation `a`",0,null],[11,"to_coordinate","","",0,null],[11,"add","","",0,null],[11,"sub","","",0,null],[11,"neg","","",0,null],[11,"new","","Create a new Position",1,{"inputs":[{"name":"coordinate"},{"name":"direction"}],"output":{"name":"position"}}],[11,"to_direction","","",1,null],[11,"to_coordinate","","",1,null],[11,"add","","",1,null],[11,"sub","","",1,null],[11,"add","","",1,null],[11,"all","","Static array of all directions",2,null],[11,"arc","","Return a vector of an arc including Directions `steps` away from the original Direction both\nsides from left to right.",2,null],[11,"from_int","","Create Direction from integer in [0, 6) range",2,{"inputs":[{"name":"i"}],"output":{"name":"direction"}}],[11,"to_int","","Convert to integer in [0, 6) range",2,null],[11,"to_direction","","",2,null],[11,"sub","","",2,null],[11,"to_coordinate","","",2,null],[11,"neg","","",2,null],[11,"all","","Static array of all angles",3,null],[11,"from_int","","Create Angle from integer in [0, 6) range",3,{"inputs":[{"name":"i"}],"output":{"name":"angle"}}],[11,"to_int","","Convert to integer in [0, 6) range",3,null],[11,"add","","",2,null]],"paths":[[3,"Coordinate"],[3,"Position"],[4,"Direction"],[4,"Angle"],[4,"Spin"],[4,"Spacing"],[4,"IntegerSpacing"],[8,"ToCoordinate"],[8,"ToDirection"]]}; initSearch(searchIndex);