Check for direction reversal

This commit is contained in:
Ed Addario 2025-09-27 17:27:29 +01:00
parent 87cba65908
commit 8a2c71f471
No known key found for this signature in database
GPG Key ID: E7875815A3230993
1 changed files with 1 additions and 1 deletions

View File

@ -1204,7 +1204,7 @@ static std::unordered_map<std::string, ggml_type> target_bpw_type(
};
while (hull.size() >= 2) {
if (cross_product(hull[hull.size() - 2], hull[hull.size() - 1], c) <= epsilon) {
if (cross_product(hull[hull.size() - 2], hull[hull.size() - 1], c) <= -1 * epsilon) { // very small negative tolerance
hull.pop_back();
} else {
break;