Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
UnghiLansator
#include <iostream> #include <math.h> using namespace std; int main() { //constante double angle1=63.332,angle2=181.201, l1=143.801, l2=88.043, l3=17.889,rod=83,pi=3.1416; double servoTicksPerDegree=0.0033; //variabile double x, l, cosfx, firstAngle,secondAngle,targetAngle,targetPos; cin>>x; cosfx=cos((angle1-x)*pi/180.0); l=sqrt(l1*l1+l2*l2-2*l1*l2*cosfx); firstAngle=acos((l3*l3+l*l-rod*rod)/(2*l3*l))*180.0/pi; secondAngle=acos((l1*l1+l*l-l2*l2)/(2*l1*l))*180.0/pi; targetAngle=angle2-(firstAngle+secondAngle)-(45-x); targetPos=(targetAngle*3)*servoTicksPerDegree; cout<<cosfx<<" "<<l<<" "<<targetAngle<<" "<<targetPos; }
run
|
edit
|
history
|
help
0
int divide by int
creating triangle using nested loop
DFS
NWD
Hashing
infix to postfix v 6.0 - (exponent support + multiple digits)
decomposition
TREAP RANGE QUERY (but it's runtime is not that good)
Beadandó
sdfsdf