[][src]Module pathfinder::tools

Utility functions

Functions

border

Checks so that the applied adjustments stay within a u8.

find

Finds an element using their hashes.

gen_rgba

Returns a random Rgb color. the opacity is always 255.

midpoint

Gives the midpoint between two points.

plot

Generates a list of Coordinates between two points. Required for drawing direct edges.

plot_bresenham

Draws a line between two coordinate points. Derived from: https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm

plot_ellipse

Draws a line between two coordinate points in the form on a ellipse.

plot_rectangle

Draws a line between two coordinate points in straight horizontal or vertical lines.

plot_type
random_item

Returns a random item from a given list.

range_color

Returns a Rgba with a modified value depending on how close it is to it's falloff point.

roll

Returns a random number between the min and maximum.

seed_rgba

Returns a Rgb color based on a seed value. the opacity is always 255.