{"action":"opened","issue":{"url":"https://api.github.com/repos/phetsims/bending-light/issues/128","labels_url":"https://api.github.com/repos/phetsims/bending-light/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/phetsims/bending-light/issues/128/comments","events_url":"https://api.github.com/repos/phetsims/bending-light/issues/128/events","html_url":"https://github.com/phetsims/bending-light/issues/128","id":98263979,"number":128,"title":"Return an object instead of an array for the time/magnitude.","user":{"login":"samreid","id":679486,"avatar_url":"https://avatars.githubusercontent.com/u/679486?v=3","gravatar_id":"","url":"https://api.github.com/users/samreid","html_url":"https://github.com/samreid","followers_url":"https://api.github.com/users/samreid/followers","following_url":"https://api.github.com/users/samreid/following{/other_user}","gists_url":"https://api.github.com/users/samreid/gists{/gist_id}","starred_url":"https://api.github.com/users/samreid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samreid/subscriptions","organizations_url":"https://api.github.com/users/samreid/orgs","repos_url":"https://api.github.com/users/samreid/repos","events_url":"https://api.github.com/users/samreid/events{/privacy}","received_events_url":"https://api.github.com/users/samreid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ChandrashekarBemagoni","id":7919831,"avatar_url":"https://avatars.githubusercontent.com/u/7919831?v=3","gravatar_id":"","url":"https://api.github.com/users/ChandrashekarBemagoni","html_url":"https://github.com/ChandrashekarBemagoni","followers_url":"https://api.github.com/users/ChandrashekarBemagoni/followers","following_url":"https://api.github.com/users/ChandrashekarBemagoni/following{/other_user}","gists_url":"https://api.github.com/users/ChandrashekarBemagoni/gists{/gist_id}","starred_url":"https://api.github.com/users/ChandrashekarBemagoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChandrashekarBemagoni/subscriptions","organizations_url":"https://api.github.com/users/ChandrashekarBemagoni/orgs","repos_url":"https://api.github.com/users/ChandrashekarBemagoni/repos","events_url":"https://api.github.com/users/ChandrashekarBemagoni/events{/privacy}","received_events_url":"https://api.github.com/users/ChandrashekarBemagoni/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-07-30T21:01:58Z","updated_at":"2015-07-30T21:01:58Z","closed_at":null,"body":"During #44 code review I observed this code in IntroModel.getWaveValue:\r\n\r\n```js\r\nreturn [ ray.time, amplitude * Math.cos( phase + Math.PI ) ];\r\n```\r\n\r\nThis is returning an array where the 0th element is the time and the 1th element is the magnitude.  It would be simpler if this code returned an object instead of an array, for instance:\r\n\r\n```js\r\nreturn {time:ray.time, magnitude:amplitude * Math.cos( phase + Math.PI )};\r\n```\r\n\r\nUnless there was a specific reason why arrays are required here, we should use the object as described above."}}