static T distanceToTuple(Line3<T> line, const tuple &t) { Vec3<T> v; if(t.attr("__len__")() == 3) { v.x = extract<T>(t[0]); v.y = extract<T>(t[1]); v.z = extract<T>(t[2]); return line.distanceTo(v); } else THROW(Iex::LogicExc, "Line3 expects tuple of length 3"); }
bool Wisp::isClicked(Line3 line) { bool clicked = 1 + 1 > line.distanceTo(location + Vector3(0, 0, TERRAINMAP.getHeight(location) + 1 + 1)); return clicked; }
static T distanceTo2(Line3<T> &line, Line3<T> &other) { MATH_EXC_ON; return line.distanceTo(other); }
static T distanceTo1(Line3<T> &line, Vec3<T> &p) { MATH_EXC_ON; return line.distanceTo(p); }