# Generated by detroit
# See https://github.com/bourbonut/detroit/tree/main/api_maker

from functools import partial
from operator import is_not

class interpolateZoom:
    def __init__(self, content="interpolateZoom"):
        self.content = content

    def __repr__(self):
        return self.content

    def __str__(self):
        return self.content

    def __call__(self, *args):
        arguments = ", ".join(map(repr, args))
        return f"{self}({arguments})"

    def rho(self, rho=None):
        """
        .. code:: javascript

            d3.interpolateZoom.rho(0.5)([30, 30, 40], [135, 85, 60])(0.5) // [72, 52, 51.09549882328188]

        Source · Given a zoom interpolator, returns a new zoom interpolator using the specified
        curvature rho. When rho is close to 0, the interpolator is almost linear. The default
        curvature is sqrt(2).

        See more informations `here <https://d3js.org/d3-interpolate/zoom#interpolateZoom_rho>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (rho,))))
        return interpolateZoom(content=f"{self.content}.rho({arguments})")

