加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
todo.js 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
llafuente 提交于 2014-05-06 18:00 . isVec2Inside4all
// 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");
}
});
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化