Utility in the Editor namespace that converts an angle in degrees into a slope (rise per unit run). It clamps input to [0,80] degrees and returns the tangent of the angle in radians.
using System;
using Sandbox;
namespace Sunless.Architecture;
// Rise per unit of run, clamped short of vertical so a mis-authored pitch cannot resolve to infinity.
public static class ArchPitch
{
public static float Slope( float degrees ) => MathF.Tan( Math.Clamp( degrees, 0f, 80f ).DegreeToRadian() );
}