Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

PVector angleBetween returns 0 when x and y of either parameter are both 0

Đang mở
#1,544 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
56/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
java
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu tại điểm vào PVector.angleBetween() và so sánh hành vi 2D với báo cáo 3D liên quan trong issue #2045. Làm rõ kết quả mong đợi khi một trong hai vector là (0,0), sau đó xác minh hành vi đã được sửa bằng coverage hồi quy cho các trường hợp đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

When either the start or end PVector is (0,0) the output of angleBetween() is always 0.

I'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.

That 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.

Edit: I forgot to add, I'm using processing 4.5.2

Image
Ngôn ngữ chính
Java
Star
497
Fork
183
Merge trung bình
4 giờ 39 phút
Pull request đã merge (30 ngày)
3

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của processing/processing4

Tất cả issue của processing/processing4

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.