Skip to content

Commit 09ff86c

Browse files
李钿李钿
authored andcommitted
动画节点计算辅助代码
1 parent 8204a06 commit 09ff86c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

calculate.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
var y,
2+
x,
3+
start = 0,
4+
end = 300,
5+
time = 147,
6+
distance = 1000,
7+
json = "[";
8+
9+
for(x = start; x < end;){
10+
// y = x * Math.sqrt(distance) / Math.sqrt(time);
11+
y = x * x ;
12+
var str = '[' + x + ',' + y + '],\n';
13+
json+=str;
14+
x = x+10
15+
}
16+
json +="]"
17+
console.info(json);

0 commit comments

Comments
 (0)