标签:nts cti UNC math int on() var code 距离
var points = [{x:0,y:0},{x:1,y:1}];
points.dist = function()
{
var p1=this[0];
var p2=this[1];
var a = p2.x-p1.x;
var b = p2.y-p1.y;
return Math.sqrt(a*a+b*b);
};
points.dist()
标签:nts cti UNC math int on() var code 距离
原文地址:https://www.cnblogs.com/ikai/p/12771712.html