package com.onthelevel.core.sensors

import org.junit.Assert.assertEquals
import org.junit.Test

class RiseRunTest {

    @Test
    fun `zero tilt has no rise over run`() {
        assertEquals(0.0, RiseRun.millimetersPerMeter(0.0), 1e-9)
        assertEquals(0.0, RiseRun.inchesPerFoot(0.0), 1e-9)
    }

    @Test
    fun `forty five degrees converts to the conventional construction slopes`() {
        assertEquals(1_000.0, RiseRun.millimetersPerMeter(45.0), 1e-9)
        assertEquals(12.0, RiseRun.inchesPerFoot(45.0), 1e-9)
    }
}
