From 74a241a3ea99656fb6b820154e8892c745000a67 Mon Sep 17 00:00:00 2001 From: Tobias Jakobs Date: Fri, 26 Dec 2014 19:59:56 +0100 Subject: [PATCH] removed isnan --- contrib/calcDistance.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/calcDistance.lua b/contrib/calcDistance.lua index 453b832..c21dd69 100644 --- a/contrib/calcDistance.lua +++ b/contrib/calcDistance.lua @@ -28,8 +28,6 @@ USAGE local dt = require "darktable" dt.configuration.check_version(...,{2,0,1}) -function isnan(x) return x ~= x end - local function calcDistance() local sel_images = dt.gui.selection() @@ -42,7 +40,7 @@ local function calcDistance() local sel_images = dt.gui.selection() for _,image in ipairs(sel_images) do - if ((not isnan(image.longitude) and not isnan(image.latitude)) and + if ((image.longitude and image.latitude) and (image.longitude ~= 0 and image.latitude ~= 90) -- Sometimes the north-pole but most likely just wrong data ) then