{"action":"opened","issue":{"url":"https://api.github.com/repos/Klonan/KS_Power/issues/7","repository_url":"https://api.github.com/repos/Klonan/KS_Power","labels_url":"https://api.github.com/repos/Klonan/KS_Power/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Klonan/KS_Power/issues/7/comments","events_url":"https://api.github.com/repos/Klonan/KS_Power/issues/7/events","html_url":"https://github.com/Klonan/KS_Power/issues/7","id":325814733,"number":7,"title":"Turbine logic.","user":{"login":"Ranakastrasz","id":1939919,"avatar_url":"https://avatars0.githubusercontent.com/u/1939919?v=4","gravatar_id":"","url":"https://api.github.com/users/Ranakastrasz","html_url":"https://github.com/Ranakastrasz","followers_url":"https://api.github.com/users/Ranakastrasz/followers","following_url":"https://api.github.com/users/Ranakastrasz/following{/other_user}","gists_url":"https://api.github.com/users/Ranakastrasz/gists{/gist_id}","starred_url":"https://api.github.com/users/Ranakastrasz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ranakastrasz/subscriptions","organizations_url":"https://api.github.com/users/Ranakastrasz/orgs","repos_url":"https://api.github.com/users/Ranakastrasz/repos","events_url":"https://api.github.com/users/Ranakastrasz/events{/privacy}","received_events_url":"https://api.github.com/users/Ranakastrasz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-23T18:03:02Z","updated_at":"2018-05-23T18:03:02Z","closed_at":null,"author_association":"NONE","body":"`if v ~= nil then\r\n      if nv > v then\r\n        dv = (nv-v)/45\r\n        s.wind_speed = v + dv\r\n      end\r\n      \r\n      if nv < v then\r\n        dv = (v-nv)/45\r\n        s.wind_speed = v - dv\r\n      end\r\n    end`\r\n\r\nSo far as I can determine, there is no difference between the two.  Both evaluate to the same amount.\r\nEither way,\r\n`s.wind_speed = v + ((nv-v)/45)`\r\n\r\n```\r\n   if nv > v then\r\n        dv = (nv-v)/45\r\n        s.wind_speed = v + dv\r\n      end\r\n      \r\n      if nv < v then\r\n        dv = (v-nv)/45\r\n        s.wind_speed = v - dv\r\n      end\r\n-- First if\r\ndv = (nv-v)/45\r\nv = v+dv\r\n-- Second if\r\ndv = (v-nv)/45\r\nv = v-dv\r\n\r\n-- First If again\r\ndv = (nv-v)/45\r\nv = v+dv\r\n\r\n-- Simplified\r\nv = v + ((nv-v)/45)\r\n\r\n\r\n-- Second If Again\r\ndv = (v-nv)/45\r\nv = v  -dv\r\n\r\n-- Simplified.\r\nv = v - (v-nv)/45)\r\nv = v + (-v -(-nv)/45)\r\nv = v + ((-v + nv)/45)\r\nv = v + ((nv-v)/45)\r\n```"}}
{"actor":{"display_login":"Ranakastrasz"}}