import math


def lat_meters(lat: float) -> float:
    """
    Transform latitude degree to meters.

    Parameters
    ----------
    lat : float
        This represent latitude value.

    Returns
    -------
    float
        Represents the corresponding latitude value in meters.

    Examples
    --------
    Latitude in Fortaleza: -3.71839
    >>> from pymove.utils.conversions import lat_meters
    >>> lat_meters(-3.71839)
    110832.75545918777
    """
    rlat = float(lat) * math.pi / 180
    # meter per degree Latitude
    meters_lat = (
        111132.92 - 559.82 * math.cos(2 * rlat) + 1.175 * math.cos(4 * rlat)
    )
    # meter per degree Longitude
    meters_lgn = 111412.84 * math.cos(rlat) - 93.5 * math.cos(3 * rlat)
    meters = (meters_lat + meters_lgn) / 2
    return meters