# Misc Utility Functions¶

## arcade.generate_uuid_from_kwargs¶

arcade.generate_uuid_from_kwargs(**kwargs) str[source]

Given key/pair combos, returns a string in uuid format. Such as text=’hi’, size=32 it will return “text-hi-size-32”. Called with no parameters, id does NOT return a random unique id.

## arcade.lerp¶

arcade.lerp(v1: float, v2: float, u: float) [source]

linearly interpolate between two values

## arcade.lerp_vec¶

arcade.lerp_vec(v1: Union[Tuple[float, float], List[float]], v2: Union[Tuple[float, float], List[float]], u: float) Union[Tuple[float, float], List[float]][source]

## arcade.rand_angle_360_deg¶

arcade.rand_angle_360_deg()[source]

Return a random angle in degrees.

## arcade.rand_angle_spread_deg¶

arcade.rand_angle_spread_deg(angle: float, half_angle_spread: float) [source]

## arcade.rand_in_circle¶

arcade.rand_in_circle(center: Union[Tuple[float, float], List[float]], radius: float)[source]

Generate a point in a circle, or can think of it as a vector pointing a random direction with a random magnitude <= radius Reference: https://stackoverflow.com/a/30564123 Note: This algorithm returns a higher concentration of points around the center of the circle

## arcade.rand_in_rect¶

arcade.rand_in_rect(bottom_left: Union[Tuple[float, float], List[float]], width: float, height: float) Union[Tuple[float, float], List[float]][source]

## arcade.rand_on_circle¶

arcade.rand_on_circle(center: Union[Tuple[float, float], List[float]], radius: float) Union[Tuple[float, float], List[float]][source]

Note: by passing a random value in for float, you can achieve what rand_in_circle() does

## arcade.rand_on_line¶

arcade.rand_on_line(pos1: Union[Tuple[float, float], List[float]], pos2: Union[Tuple[float, float], List[float]]) Union[Tuple[float, float], List[float]][source]

Given two points defining a line, return a random point on that line.

## arcade.rand_vec_magnitude¶

arcade.rand_vec_magnitude(angle: float, lo_magnitude: float, hi_magnitude: float) Union[Tuple[float, float], List[float]][source]

## arcade.rand_vec_spread_deg¶

arcade.rand_vec_spread_deg(angle: float, half_angle_spread: float, length: float) Union[Tuple[float, float], List[float]][source]

## arcade.configure_logging¶

arcade.configure_logging(level: Optional[int] = None)[source]

Set up basic logging. :param int level: The log level. Defaults to DEBUG.