Home > Back-end >  An algorithm method is not too understand
An algorithm method is not too understand

Time:01-27

 
Public static List GetTracks (int short) {
//print (f 'short is {short}')
Short +=20;
A double v=Math. The random () * 400 + 200;
Double t=0.06;
List ForwardTracks=new ArrayList<> (a);
Int current=0;
int a;
Int mid=short * 4/5;
While (current & lt; Short) {
If (current & lt; Mid) {
A=40;
} else {
A=- 10;
}
Double s=t + 0.5 v * * a * (math.h pow (t, 2));
V=v + a * t;
The current +=s;
ForwardTracks. Add (Math. Round (s));
}
Return forwardTracks;
}

The role of the original code, this is company produce is given an int type horizontal coordinates, then generate one smaller than the horizontal length, for crawler sliding taobao and the slider, but I see not too understand this role, hope have bosses can give a way of thinking,
  • Related