Skip to content

Commit

Permalink
more efficient check for constant entries
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc authored and Alex-Jordan committed Feb 4, 2024
1 parent 053cfdf commit 7da067c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Parser/List/Vector.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ sub _check {
$type = (($type =~ m/^[aeiou]/i) ? "an " : "a ") . $type;
$self->{equation}->Error([ "Coordinates of Vectors must be Numbers, not %s", $type ]);
}
if ($self->context->flag("requireConstantEntries") && !($x->{isConstant})) {
$self->{equation}->Error("Coordinates of Vectors must be constant");
}
}
$self->{equation}->Error("Coordinates of Vectors must be constant")
if ($self->context->flag("requireConstantEntries") && !($self->{isConstant}));
}

sub ijk {
Expand Down

0 comments on commit 7da067c

Please sign in to comment.