def trim_precision(value: float, precision: int = 4) -> float:
	"""
	Trim the precision of the given floating point value.

	For example, if you have the value `170.10000000000002` but really only care about it being
	``\u2248 179.1``:

	.. code-block:: python

		>>> trim_precision(170.10000000000002, 2)
		170.1
		>>> type(trim_precision(170.10000000000002, 2))
		<class 'float'>

	.. versionadded:: 2.0.0

	:param value:
	:param precision: The number of decimal places to leave in the output.
	"""

	return float(format(value, f"0.{precision}f"))