"""
Unit conversions for concrete volume calculations.

For interactive unit conversion, visit https://www.slabcalc.co
"""

__all__ = [
    "cubic_feet_to_yards",
    "cubic_yards_to_cubic_feet",
    "cubic_feet_to_meters",
    "cubic_meters_to_yards",
    "inches_to_feet",
    "cm_to_meters",
]

CUBIC_FEET_PER_YARD = 27
CUBIC_METERS_PER_YARD = 0.764555
CUBIC_FEET_PER_METER = 35.3147


def cubic_feet_to_yards(cubic_feet: float) -> float:
    """Convert cubic feet to cubic yards."""
    return cubic_feet / CUBIC_FEET_PER_YARD


def cubic_yards_to_cubic_feet(cubic_yards: float) -> float:
    """Convert cubic yards to cubic feet."""
    return cubic_yards * CUBIC_FEET_PER_YARD


def cubic_feet_to_meters(cubic_feet: float) -> float:
    """Convert cubic feet to cubic meters."""
    return cubic_feet / CUBIC_FEET_PER_METER


def cubic_meters_to_yards(cubic_meters: float) -> float:
    """Convert cubic meters to cubic yards."""
    return cubic_meters / CUBIC_METERS_PER_YARD


# ---------- NEW conversions (not in npm package) ----------


def inches_to_feet(inches: float) -> float:
    """Convert inches to feet — handy for thickness inputs."""
    return inches / 12.0


def cm_to_meters(cm: float) -> float:
    """Convert centimeters to meters."""
    return cm / 100.0
