Title: PVector angleBetween returns 0 when x and y of either parameter are both 0 · Issue #1544 · processing/processing4 · GitHub
Open Graph Title: PVector angleBetween returns 0 when x and y of either parameter are both 0 · Issue #1544 · processing/processing4
X Title: PVector angleBetween returns 0 when x and y of either parameter are both 0 · Issue #1544 · processing/processing4
Description: I found an existing report describing similar behavior with 3D PVectors (processing/processing#2045), but it appears the same problem affects 2D PVectors as well. When either the start or end PVector is (0,0) the output of angleBetween()...
Open Graph Description: I found an existing report describing similar behavior with 3D PVectors (processing/processing#2045), but it appears the same problem affects 2D PVectors as well. When either the start or end PVect...
X Description: I found an existing report describing similar behavior with 3D PVectors (processing/processing#2045), but it appears the same problem affects 2D PVectors as well. When either the start or end PVect...
Opengraph URL: https://github.com/processing/processing4/issues/1544
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PVector angleBetween returns 0 when x and y of either parameter are both 0","articleBody":"I found an existing report describing similar behavior with 3D PVectors (https://github.com/processing/processing/issues/2045), but it appears the same problem affects 2D PVectors as well.\n\nWhen either the start or end `PVector` is `(0,0)` the output of `angleBetween()` is always 0.\n\nI'm not particularly experienced with Processing, so it's entirely possible that I'm misunderstanding something or using the API incorrectly. I tend to pick it up every few months for small projects and then promptly forget most of what I learned.\n\nThat said, I've spent some time testing this behavior and looking into the implementation, and based on what I found, I would not expect the angle to be 0 in the cases I tested.\n\nEdit: I forgot to add, I'm using processing 4.5.2\n\n\u003cimg width=\"894\" height=\"621\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1c5918f6-e319-461d-afa5-101fedfb2cab\" />","author":{"url":"https://github.com/WolfyD","@type":"Person","name":"WolfyD"},"datePublished":"2026-07-01T16:49:12Z","url":"https://github.com/processing/processing4/issues/1544"}
| 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:3d131cc1-800d-c954-d9cc-f3ad07b562e2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABE2:5C450:EDAFE:149582:6B05F789 |
| html-safe-nonce | 89d6f99c9c4d6e66659f0bff1a3c3e858936d591d71ee75b6d76e072adc9a0a5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkUyOjVDNDUwOkVEQUZFOjE0OTU4Mjo2QjA1Rjc4OSIsInZpc2l0b3JfaWQiOiI2MDk0Mjg0OTc4NjEzMTAzNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 11cda387cc44699bd852ba05ea44c0ac15f61cf0226b9901c959e883c583707f |
| hovercard-subject-tag | issue:4893957096 |
| 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/processing4/1544/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d83d9e2c77bad22f94f915f1f61abb3cbeddd2a5c69a8009a4527b94c02e1cfb/processing/processing4/issues/1544 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d83d9e2c77bad22f94f915f1f61abb3cbeddd2a5c69a8009a4527b94c02e1cfb/processing/processing4/issues/1544 |
| og:image:alt | I found an existing report describing similar behavior with 3D PVectors (processing/processing#2045), but it appears the same problem affects 2D PVectors as well. When either the start or end PVect... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | WolfyD |
| hostname | github.com |
| expected-hostname | github.com |
| None | c214754a6652274794ed4e054a7b71be999d69843f103ba54893001d45010ece |
| turbo-cache-control | no-preview |
| go-import | github.com/processing/processing4 git https://github.com/processing/processing4.git |
| octolytics-dimension-user_id | 1617169 |
| octolytics-dimension-user_login | processing |
| octolytics-dimension-repository_id | 844382769 |
| octolytics-dimension-repository_nwo | processing/processing4 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 844382769 |
| octolytics-dimension-repository_network_root_nwo | processing/processing4 |
| 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