Closed satvu closed 2 years ago
Good question. It's an idiom for checking for NaN (not a number), which is the default value. So, basically, this is checking if this parameter is using the default value NaN and if it is, changing it to a better default value. (I couldn't assign it directly to the better default value because C# doesn't allow default assignment to computed values.) There should be a comment that explains this, but it should work in any case.
@CarlKCarlK can it be changed to Double.IsNaN(probabilityAppearsInLineFromReference)
?
Yes, that would improve readability.
From: Luke Bordonaro @.> Sent: Sunday, November 28, 2021 7:22 PM To: luillo1/RaceResults @.> Cc: Carl Kadie @.>; Mention @.> Subject: Re: [luillo1/RaceResults] Typo: What objects should be compared here? (Issue #32)
@CarlKCarlKhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FCarlKCarlK&data=04%7C01%7C%7C56776d9c38b348d9cbc608d9b2e7711c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637737529365800456%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=JMmzI3moBPZURTH5DpqyCKmoVPKZXIlLe5jQ8aQHxsc%3D&reserved=0 can it be changed to Double.IsNaN(probabilityAppearsInLineFromReference)?
- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fluillo1%2FRaceResults%2Fissues%2F32%23issuecomment-981256018&data=04%7C01%7C%7C56776d9c38b348d9cbc608d9b2e7711c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637737529365810405%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4V3vikb4oSCLlKvmWHF5gcnLV2VMQ06QbNmrD1FMvz0%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABR65P2POVO7SCCZ762SGMTUOLWWPANCNFSM5I6B24EA&data=04%7C01%7C%7C56776d9c38b348d9cbc608d9b2e7711c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637737529365810405%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=cpilLdTTZ7Uv%2Bfh3opYKsigLYzbsjP3K1Z49GJpTBUE%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C56776d9c38b348d9cbc608d9b2e7711c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637737529365810405%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Rt2TLa9wsRV7ZVQDJz24mnH53c0vhA1ic1%2BDBmIfaBY%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C56776d9c38b348d9cbc608d9b2e7711c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637737529365820370%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=d8sXv5ttZuqCTEK7PPh8f035r1NMhYBXVe96kA3Xw%2Fs%3D&reserved=0.
This line in Scorer.cs is comparing an object to itself
cc: @CarlKCarlK