var searchIndex = {}; searchIndex["shapes"] = {"doc":"Convenience structs for 2D shapes","items":[[3,"Line","shapes","A line.",null,null],[12,"start","","Start point.",0,null],[12,"end","","End point.",0,null],[3,"Point","","A point in the Cartesian plane.",null,null],[12,"x","","The x coordinate.",1,null],[12,"y","","The y coordinate.",1,null],[3,"Rect","","A rectangle.",null,null],[12,"pos","","The position of the top left corner of the rectangle.",2,null],[12,"size","","The width and height of the rectangle.",2,null],[3,"Size","","The size of a shape.",null,null],[12,"w","","The horizontal length of the shape (width).",3,null],[12,"h","","The vertical length of the shape (height).",3,null],[11,"fmt","","",0,null],[11,"clone","","",0,null],[11,"from","","",0,{"inputs":[{"name":"line"}],"output":{"name":"line"}}],[11,"from","","",0,null],[11,"from","","",0,null],[11,"from","","",0,null],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"add","","",1,null],[11,"add","","",1,null],[11,"from","","",1,{"inputs":[{"name":"vec2d"}],"output":{"name":"point"}}],[11,"from","","",1,null],[11,"sub","","",1,null],[11,"sub","","",1,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"from","","Creates a rectangle from the position of its top left corner and its size.",2,null],[11,"from","","Creates a rectangle from an array.",2,null],[11,"from","","",2,null],[11,"bottom","","Returns the position of the bottom side of the rectangle.",2,null],[11,"centered","","Computes a rectangle with quadruple the surface area of self and with center\n(self.x, self.y).",2,null],[11,"contains","","Compute whether or not the point is inside the rectangle.",2,null],[11,"new_circle","","Create a rectangle that circumscribes the given circle.",2,{"inputs":[{"name":"t"},{"name":"scalar"}],"output":{"name":"rect"}}],[11,"new_square","","Create a square rectangle with sides of length len and top left corner at pos.",2,{"inputs":[{"name":"t"},{"name":"scalar"}],"output":{"name":"rect"}}],[11,"left","","Returns the position of the left side of the rectangle.",2,null],[11,"margin","","Computes a rectangle whose perimeter forms the inside edge of margin with size m for self.",2,null],[11,"relative","","Computes a rectangle translated (slid) in the direction of the vector a distance relative\nto the size of the rectangle. For example, self.relative([1.0, 1.0]) returns a rectangle\none rectangle to the right and down from the original.",2,null],[11,"right","","Returns the position of the right side of the rectangle.",2,null],[11,"scaled","","Computes a scaled rectangle with the same position as self.",2,null],[11,"top","","Returns the position of the top side of the rectangle.",2,null],[11,"fmt","","",3,null],[11,"clone","","",3,null],[11,"from","","",3,{"inputs":[{"name":"vec2d"}],"output":{"name":"size"}}],[11,"from","","",3,null],[11,"mul","","",3,null],[11,"mul","","",3,null]],"paths":[[3,"Line"],[3,"Point"],[3,"Rect"],[3,"Size"]]}; initSearch(searchIndex);