refactor(rules): update criteria with <= operator where applicable
CI / Lint Rust (push) Canceled after 0s
CI / Lint Python (push) Canceled after 0s
CI / Test Rust (push) Canceled after 0s
CI / Build wheels (macos-latest) (push) Canceled after 0s
CI / Build wheels (ubuntu-latest) (push) Canceled after 0s
CI / Build wheels (windows-latest) (push) Canceled after 0s
CI / Test Python 3.10 (push) Canceled after 0s
CI / Test Python 3.11 (push) Canceled after 0s
CI / Test Python 3.12 (push) Canceled after 0s
CI / Test Python 3.13 (push) Canceled after 0s
CI / Test Python 3.9 (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build documentation (push) Canceled after 0s

This commit is contained in:
Antoine Anceau committed 2026-07-07 06:56:58 +02:00
1 parent 11879f2992
commit fec53f4012
3 files changed
+9 -13

No files matched your search

+4 -10
View File
@@ -203,12 +203,9 @@ fn check(ctx) {
"Equilibrium angle due to passenger crowding ≤ " + max_heel_due_to_lever.toFixed(1) + "°",
max_heel_due_to_lever,
angle_pass,
"°"
"°",
"<="
));
// Actual margin should be inverted here since angle_pass must be <= max
let r_len = results.len();
results[r_len - 1].status = if angle_pass <= max_heel_due_to_lever { "PASS" } else { "FAIL" };
results[r_len - 1].margin = max_heel_due_to_lever - angle_pass;
} else {
results.push(#{
name: "Passenger Crowding Heel",
@@ -226,12 +223,9 @@ fn check(ctx) {
"Equilibrium angle due to wind ≤ " + max_heel_due_to_lever.toFixed(1) + "°",
max_heel_due_to_lever,
angle_wind,
"°"
"°",
"<="
));
// Actual margin should be inverted
let r_len = results.len();
results[r_len - 1].status = if angle_wind <= max_heel_due_to_lever { "PASS" } else { "FAIL" };
results[r_len - 1].margin = max_heel_due_to_lever - angle_wind;
} else {
results.push(#{
name: "Wind Heeling Angle",
+1 -1
View File
@@ -219,7 +219,7 @@ if has_wind {
if phi0 != () {
// Check 3.2.2.1
results.push(criterion("3.2.2.1 Equilibrium", "Steady wind heel <= 16 deg", 16.0, phi0, "deg"));
results.push(criterion("3.2.2.1 Equilibrium", "Steady wind heel <= 16 deg", 16.0, phi0, "deg", "<="));
// 3. lw2 = 1.5 * lw1
let lw2 = 1.5 * lw1;
+4 -2
View File
@@ -61,7 +61,8 @@ fn check(ctx) {
"Angle of heel due to passenger crowding",
MAX_HEEL_PASSENGER,
angle_pass,
"°"
"°",
"<="
));
} else {
results.push(#{
@@ -86,7 +87,8 @@ fn check(ctx) {
"Angle of heel due to turning",
MAX_HEEL_TURNING,
angle_turn,
"°"
"°",
"<="
));
} else {
results.push(#{