Triangle slope calculation before loop.