chiark / gitweb /
js: piece_xy: Make it return Pos
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 2 Apr 2021 20:43:02 +0000 (21:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 2 Apr 2021 22:02:48 +0000 (23:02 +0100)
Just tidying up.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts

index b4bf063779f8c7288bcef868a50ed987ec27e5e3..2dc67a5b46d1bfa1fd37478f0bef3fa0d99aabbf 100644 (file)
@@ -680,7 +680,7 @@ var dcy : number | null;
 
 const DRAGTHRESH = 5;
 
-function piece_xy(p: PieceInfo): [number, number] {
+function piece_xy(p: PieceInfo): Pos {
   return [ parseFloat(p.uelem.getAttributeNS(null,"x")!),
           parseFloat(p.uelem.getAttributeNS(null,"y")!) ];
 }