Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这个插件怎么用 #5

Open
chenjacky131 opened this issue Mar 12, 2020 · 1 comment
Open

这个插件怎么用 #5

chenjacky131 opened this issue Mar 12, 2020 · 1 comment

Comments

@chenjacky131
Copy link

为什么验证函数这个验证函数一直都是返回true
var sum = 0.0;
for(var i =0; i < arr.length; i++){
sum += arr[i];
}
var avg = sum * 1.0 / arr.length;
var sum2 = 0.0;
for(var j=0; j< arr.length; j++){
sum2+=Math.pow(arr[j] - avg, 2);
}
var stddev = sum2 / arr.length;
return stddev != 0;

@ChenZixinn
Copy link

中文README提到了,这段代码只判断了Y轴是否偏移,所以如果你是人为拖动的,理论上都是true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants