Title: Concise NearZero function · Issue #50 · gameprogcpp/code · GitHub
Open Graph Title: Concise NearZero function · Issue #50 · gameprogcpp/code
X Title: Concise NearZero function · Issue #50 · gameprogcpp/code
Description: In math library, the extra branching statement for NearZero function is redundant Original inline bool NearZero(float val, float epsilon = 0.001f) { if (fabs(val) <= epsilon) { return true; } else { return false; } } Suggested: inline bo...
Open Graph Description: In math library, the extra branching statement for NearZero function is redundant Original inline bool NearZero(float val, float epsilon = 0.001f) { if (fabs(val) <= epsilon) { return true; } else ...
X Description: In math library, the extra branching statement for NearZero function is redundant Original inline bool NearZero(float val, float epsilon = 0.001f) { if (fabs(val) <= epsilon) { return true; } el...
Opengraph URL: https://github.com/gameprogcpp/code/issues/50
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Concise NearZero function","articleBody":"In math library, the extra branching statement for NearZero function is redundant\r\nOriginal\r\n```\r\n\tinline bool NearZero(float val, float epsilon = 0.001f)\r\n\t{\r\n\t\tif (fabs(val) \u003c= epsilon)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n```\r\n\r\nSuggested:\r\n```\r\n\tinline bool NearZero(float val, float epsilon = 0.001f)\r\n\t{\r\n\t\treturn fabs(val) \u003c= epsilon);\r\n\t}\r\n```","author":{"url":"https://github.com/LeeTeng2001","@type":"Person","name":"LeeTeng2001"},"datePublished":"2022-03-12T01:28:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/50/code/issues/50"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cd3236a1-09f6-520a-e0c7-cb9eea3d4da6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B00E:F89EA:2EEC7E5:3F63F26:697081A5 |
| html-safe-nonce | ec02f2f48ad3c92287420573780e0c41682cc92f87a89cf245a8720daf9b1428 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDBFOkY4OUVBOjJFRUM3RTU6M0Y2M0YyNjo2OTcwODFBNSIsInZpc2l0b3JfaWQiOiI0MTU4OTk3NjkxMjYzNjQ4MTY1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b2d9a82a6e68a185f2b9c5a08ae854197534c561172c48357c574b545616056b |
| hovercard-subject-tag | issue:1167135231 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gameprogcpp/code/50/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d07baa8a062ebdb461f27175fa7b3831def3c9886cb300792cf81f78f024c283/gameprogcpp/code/issues/50 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d07baa8a062ebdb461f27175fa7b3831def3c9886cb300792cf81f78f024c283/gameprogcpp/code/issues/50 |
| og:image:alt | In math library, the extra branching statement for NearZero function is redundant Original inline bool NearZero(float val, float epsilon = 0.001f) { if (fabs(val) <= epsilon) { return true; } else ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LeeTeng2001 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/gameprogcpp/code git https://github.com/gameprogcpp/code.git |
| octolytics-dimension-user_id | 33610484 |
| octolytics-dimension-user_login | gameprogcpp |
| octolytics-dimension-repository_id | 110481501 |
| octolytics-dimension-repository_nwo | gameprogcpp/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 110481501 |
| octolytics-dimension-repository_network_root_nwo | gameprogcpp/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width