Solution: Physics Trajectory Engine

Review the usage of static local functions combined with static class imports.

Solution: Physics Trajectory Engine

Review the usage of static local functions combined with static class imports.
C# 14.0
using static System.Math;
double velocity = 25.0;
double angleInRadians = 0.785398;
double rawDistance = CalculateDistance(velocity, angleInRadians);
double finalDistance = Round(rawDistance, 2);
Console.WriteLine($"The projectile traveled {finalDistance} meters.");
static double CalculateDistance(double v, double theta)
{
double gravity = 9.81;
return (Pow(v, 2) * Sin(2 * theta)) / gravity;
}