[−][src]Module minutiae::util
General-purpose utility functions
Structs
Color |
Enums
EntityLocation |
Functions
calc_offset | Calculates the offset between two coordinates; where point 2 is located relative to point 1 |
debug | |
get_coords | Given an index of the universe and the universe's size returns X and Y coordinates. |
get_index | Given an X and Y coordinate in the universe and the universe's size, returns the index of that coordinate in the universe. |
iter_visible | Given current X and Y coordinates of an entity and the view distance of the universe, creates an iterator visiting the indexes of all visible grid coordinates. Note that this will include the index of the source entity. |
locate_entity | Attempts to find the entity index of an entity with a specific UUID and a set of coordinates where it is expected to be located. |
locate_entity_simple | Searches one coordinate of the universe and attempts to find the entity ID of the entity with the supplied UUID. |
manhattan_distance | Calculates the manhattan distance between the two provided grid cells |
translate_entity |
Type Definitions
ColorCalculator |