Please provide the code you are using, the actual error, and more context.
The first number is intended to be angular acceleration of a bullet, calculated by the function
function CalcAngleAccel1(a1,a2,l1,l2,g,m1,m2,a_v1,a_v2){
let part1 = -1*g*(2*m1 + m2)*sin(a1);
let part2 = -1*m2*g*sin(a1 - 2*a2);
let part3 = -2*sin(a1 - a2)*m2;
let part4 = a_v2*a_v2*l2 + a_v1*a_v1*l1*cos(a1 - a2);
let part5 = l1*(2*m1 + m2 - m2*cos(2*a1 - 2*a2));
let ans = (part1 + part2 + part3*part4)/part5;
WriteLog(ans);
return ans;
}
In which a1 and a2 are a set of angles, a_v1 and a_v2 are those angles' respective angular velocities in the previous frame, and l, g and m are constant variables.
This value is then added to the angular velocity (a_v1), which is then added to the angle (a1).
WriteLog(a1) gives the second value.
The third value is provided by WriteLog(sin(-a1))
The intention is to make a bullet follow a path dictated by polar coordinates using this angle, imitating the movement of a double pendulum. At present, the bullet appears to follow an incorrect path, and then vanish (perhaps moving to (0,0)?) when these errors appear.