Skip to content

Commit b028362

Browse files
committed
improve documentation
1 parent 240bbf3 commit b028362

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

macros/PGmatrixmacros.pl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,11 +769,14 @@ =head2 convert_to_array_ref {
769769
sub convert_to_array_ref {
770770
my $input = shift;
771771
if (Value::isValue($input) and Value::classMatch($input,"Matrix")) {
772-
$input = [$input->value];
772+
# handles Value::Matrix (MathObject matrices)
773+
$input = [$input->value]; # convert an array to an array_ref (see POD comment above)
773774
} elsif (ref($input) eq 'Matrix' ) {
775+
# handles wwMatrix objects (old style)
774776
$input = $input->array_ref;
775777
} elsif (ref($input) =~/ARRAY/) {
776778
# no change to input value
779+
# handles raw perl array_ref types
777780
} else {
778781
WARN_MESSAGE("This does not appear to be a matrix ");
779782
}

0 commit comments

Comments
 (0)