代码拉取完成,页面将自动刷新
// todo generator
var js2math = require("./index.js");
["Triangle", "Rectangle", "Circle", "AABB2", "Polygon"].forEach(function(geom) {
["isVec2Inside", "area", "perimeter", "contains"].forEach(function(fname) {
if (!js2math[geom][fname]) {
console.log(geom+"."+fname);
}
});
});
exit();
["Triangle", "Rectangle", "Circle", "Polygon"].forEach(function(geom) {
if (!js2math.AABB2["from" + geom]) {
console.log("AABB2.from" + geom);
}
});
// todo list
["Vec2", "Line2", "Segment2", "Rectangle", "Circle", "AABB2"].forEach(function(v) {
//console.log(v, js2math[v]);
if("function" !== typeof js2math[v].distance) {
console.log(v, " distance is missing");
}
if("function" !== typeof js2math[v].length) {
console.log(v, " length is missing");
}
if("function" !== typeof js2math[v].area) {
console.log(v, " area is missing");
}
["Vec2", "Line2", "Segment2", "Rectangle", "Circle"].forEach(function(v2) {
if (v == v2) {
return;
}
if (!js2math.Intersection[v.toLowerCase() + "_" + v2.toLowerCase()]) {
console.log(v.toLowerCase() + "_" + v2.toLowerCase(), " intersection is missing");
}
});
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。