Module conrod::utils [−] [src]

Various utility functions used throughout Conrod.

Functions

clamp

Clamp a value between a given min and max.

is_over_rect

Return whether or not a given point is over a rectangle at a given point on a cartesian plane.

map_range

Map a value from a given range to a new given range.

percentage

Get value percentage between max and min.

val_to_string

Get a suitable string from the value, its max and the pixel range.

value_from_perc

Adjust the value to the given percentage.