Skip to content

Conversation

@linusbbb
Copy link
Contributor

No description provided.

].minBy[(projectionPointAndDistance.second - it.value).abs]
]
.filter[it.value != null]
.minBy[(projectionPointAndDistance.second - it.value).abs]
Copy link
Contributor

Choose a reason for hiding this comment

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

here will throw Exception by minBy when the input list empty

Copy link
Contributor

@TruongQuangSB TruongQuangSB Jan 26, 2026

Choose a reason for hiding this comment

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

you can use IterableExtensions#fold and get min

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants