def floatToString3(f: float) -> str:
    """Return float f as a string with three decimal places without trailing zeros
    and dot.

    Intended for places where three decimals are enough, e.g. node positions.
    """
    return f"{f:.3f}".rstrip("0").rstrip(".")