Skip to content

Conversation

@HarutakaMatsumoto
Copy link
Member

In v1.0.5, TestMeasureNonnegativeDistance_2Dimension failed, so the error judgment has been fixed.
The discovery of this issue was delayed due to test changes in v1.0.5.
To prevent recurrence, we now use cmpopts.Equateapprox to define the error due to differences in models.

Harutaka Obara (Matsumoto) added 3 commits October 7, 2025 14:56
TestMeasureNonnegativeDistance_2Dimension succeeded
Improved compatibility
@HarutakaMatsumoto HarutakaMatsumoto self-assigned this Oct 7, 2025
@HarutakaMatsumoto HarutakaMatsumoto added the bug Something isn't working label Oct 7, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a failing test and improves floating-point comparison compatibility by addressing numerical precision issues in distance measurements. The changes ensure more robust testing by using approximate equality comparisons for floating-point values.

  • Upgraded Go version from 1.18 to 1.21 and added go-cmp dependency for better floating-point comparison
  • Fixed boundary condition check from strict inequality to less-than-or-equal-to in the GJK algorithm
  • Updated all test assertions to use approximate equality with cmpopts.EquateApprox for consistent floating-point comparisons

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
go.mod Updated Go version to 1.21 and added go-cmp v0.7.0 dependency
Measure_test.go Replaced exact floating-point equality checks with approximate comparisons and updated expected test values
Measure.go Fixed boundary condition check in GJK algorithm from strict to inclusive inequality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@HarutakaMatsumoto HarutakaMatsumoto merged commit deffb79 into develop Oct 7, 2025
1 check passed
@HarutakaMatsumoto HarutakaMatsumoto deleted the feature/fixFor2Dimension branch October 7, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants