set viewport to speed up mobile taps, hex and square both handle 'pointy top' versions

This commit is contained in:
Gavin McDonald
2016-02-18 10:45:48 -05:00
parent f7cb7c094a
commit c3e5995bf1
8 changed files with 44 additions and 875 deletions

View File

@@ -31,6 +31,13 @@ export function extend(obj, src) {
return obj;
}
// hypotenuse factor of isoscelese right triangle
export let sqrt2 = Math.sqrt(2);
// short width factor given the lenght of a hexagon's side
// (2*S gives long width)
export let sqrt3 = Math.sqrt(3);
export function hypotenuse(a, b) {
if (b == null) b = a;