private float addTriangularForceDeflection(LineLoad load, float lineLength, float x, ref float angle, float RA, float a, float b, float q, float c1, float c2, float d1, float d2, float e1, float e2)
{
float flecha = 0.0f;
if (x < a)
{
flecha = RA * (float)Math.Pow(x, 3) / 6.0f + c1 * x + c2;
angle = RA * x * x / 2f + c1;
}
else if (x >= a && x <= a + b)
{
flecha = b > float.Epsilon ? RA * (float)Math.Pow(x, 3) / 6.0f - q * (float)Math.Pow(x - a, 5) / (120.0f * b) + d1 * x + d2 : 0.0f;
angle = b > float.Epsilon ? RA * x * x / 2f - q * (float)Math.Pow(x - a, 4) / (24f * b) + d1 : 0.0f;
}
else if (x > a + b)
{
flecha = RA * (float)Math.Pow(x, 3) / 6.0f - q * b * (float)Math.Pow(x - (a + 2.0f * b / 3.0f), 3) / 12.0f + e1 * x + e2;
angle = RA * x * x / 2f - q * b * (float)Math.Pow(x - (a + 2f * b / 3f), 2) / 4f + e1;
}
return flecha;
}