tvwenger / maxfield

An Ingress Linking and Fielding Strategy Generator
http://www.ingress-maxfield.com/
GNU General Public License v3.0
107 stars 58 forks source link

Fix computation of triangleKey for higher number of portals (>64) #13

Closed pwiecz closed 7 years ago

pwiecz commented 7 years ago

Elements of verts list in Triangle class has types either int or numpy.int64. For v of type int the type of (1 << v) is automatically promoted to long for large v. For v of type numpy.int64 (1 << v) is kept as numpy.int64, so the triangleKey gets invalid, truncated value. Fix it by casting types of v to int, during the computation of the triangleKey.

tvwenger commented 7 years ago

Thanks