Skip to content

Commit cb7e572

Browse files
committed
fix division by zero error
1 parent 8c7a553 commit cb7e572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Contrib/CCCS/AlgebraicLiteracy/Equations_of_Lines/Parallel_Perp_1.pg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ if ( $chooser == 0) {
6363
$compare = "negative reciprocals";
6464
$answer = "perpendicular";
6565
} else {
66-
do { $B2 = random(-20,20); } until (($B2 != $B2Para) and ($B2 != $B2Perp));
66+
do { $B2 = non_zero_random(-20,20); } until (($B2 != $B2Para) and ($B2 != $B2Perp));
6767
$popup = PopUp(["?","Parallel", "Perpendicular","Neither"], "Neither");
6868
$compare = "different but not negative reciprocals";
6969
$answer = "neither parallel nor perpendicular";

0 commit comments

Comments
 (0)