Title: PVector.angleBetween() returns 0 for 3D vectors whenever x and y are both 0 · Issue #2045 · processing/processing · GitHub
Open Graph Title: PVector.angleBetween() returns 0 for 3D vectors whenever x and y are both 0 · Issue #2045 · processing/processing
X Title: PVector.angleBetween() returns 0 for 3D vectors whenever x and y are both 0 · Issue #2045 · processing/processing
Description: PVector.angleBetween(PVector, PVector) returns 0 for 3D vectors whenever the x and y components of a parameter are both 0. For example: PVector.angleBetween(new PVector(0,0,1), new PVector(1,0,0)) returns 0 instead of PI/2. Looking at th...
Open Graph Description: PVector.angleBetween(PVector, PVector) returns 0 for 3D vectors whenever the x and y components of a parameter are both 0. For example: PVector.angleBetween(new PVector(0,0,1), new PVector(1,0,0)) ...
X Description: PVector.angleBetween(PVector, PVector) returns 0 for 3D vectors whenever the x and y components of a parameter are both 0. For example: PVector.angleBetween(new PVector(0,0,1), new PVector(1,0,0)) ...
Opengraph URL: https://github.com/processing/processing/issues/2045
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PVector.angleBetween() returns 0 for 3D vectors whenever x and y are both 0","articleBody":"`PVector.angleBetween(PVector, PVector)` returns 0 for 3D vectors whenever the x and y components of a parameter are both 0. For example:\n\n```\nPVector.angleBetween(new PVector(0,0,1), new PVector(1,0,0))\n```\n\nreturns 0 instead of PI/2.\n\nLooking at the source code, it seems clear what is wrong:\n\n```\n// We get NaN if we pass in a zero vector which can cause problems\n// Zero seems like a reasonable angle between a (0,0) vector and something else\nif (v1.x == 0 && v1.y == 0) return 0.0f;\nif (v2.x == 0 && v2.y == 0) return 0.0f;\n```\n","author":{"url":"https://github.com/sebhunt","@type":"Person","name":"sebhunt"},"datePublished":"2013-08-27T10:09:49Z","url":"https://github.com/processing/processing/issues/2045"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:93186675-5f24-6444-dce4-21344acba253 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D728:3BA419:191330:219923:6B05F935 |
| html-safe-nonce | 6686321e46b167c73896a261397ed0e53433a54d6501a06a452c1a4eb66770d3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzI4OjNCQTQxOToxOTEzMzA6MjE5OTIzOjZCMDVGOTM1IiwidmlzaXRvcl9pZCI6IjU0MzY1NTc3ODUzMjIzNTQ5OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 42a62b6a36a5b40a537bb9afc343282db2623951ac1fe242fc53bba6bfa34a95 |
| hovercard-subject-tag | issue:18598187 |
| 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/processing/processing/2045/issue_layout |
| twitter:image | https://opengraph.githubassets.com/06f55497c9fcfa41b9d2197d5bd8a8f7b7186c346837605bdb9f878c1c40a59a/processing/processing/issues/2045 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/06f55497c9fcfa41b9d2197d5bd8a8f7b7186c346837605bdb9f878c1c40a59a/processing/processing/issues/2045 |
| og:image:alt | PVector.angleBetween(PVector, PVector) returns 0 for 3D vectors whenever the x and y components of a parameter are both 0. For example: PVector.angleBetween(new PVector(0,0,1), new PVector(1,0,0)) ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sebhunt |
| hostname | github.com |
| expected-hostname | github.com |
| None | c214754a6652274794ed4e054a7b71be999d69843f103ba54893001d45010ece |
| turbo-cache-control | no-preview |
| go-import | github.com/processing/processing git https://github.com/processing/processing.git |
| octolytics-dimension-user_id | 1617169 |
| octolytics-dimension-user_login | processing |
| octolytics-dimension-repository_id | 7807399 |
| octolytics-dimension-repository_nwo | processing/processing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7807399 |
| octolytics-dimension-repository_network_root_nwo | processing/processing |
| 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 | 7d164a4e71eb333b2b17fd5b17e18efb7855505c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width