ScalingSettings::MinPartiality: validate the argument, not the value it replaces
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu (cherry picked from commit df5f2ae22f979a5569f4d569fe2a8cdd5999d242)
This commit is contained in:
1 parent
2dbb9d5951
commit
925701a1ce
2 files changed
+10
-1
No files matched your search
@@ -90,7 +90,7 @@ std::optional<double> ScalingSettings::GetRotationWedgeForScaling() const {
|
||||
}
|
||||
|
||||
ScalingSettings &ScalingSettings::MinPartiality(double input) {
|
||||
if (min_partiality < 0.0 || min_partiality > 1.0)
|
||||
if (!(input >= 0.0 && input <= 1.0))
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Min partiality must be between 0 and 1");
|
||||
min_partiality = input;
|
||||
return *this;
|
||||
|
||||
Reference in new issue
Block a user