aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/plot3d.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/plot3d.spad.pamphlet')
-rw-r--r--src/algebra/plot3d.spad.pamphlet9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/algebra/plot3d.spad.pamphlet b/src/algebra/plot3d.spad.pamphlet
index aa98d794..1ea091a3 100644
--- a/src/algebra/plot3d.spad.pamphlet
+++ b/src/algebra/plot3d.spad.pamphlet
@@ -445,12 +445,9 @@ Plot3D(): Exports == Implementation where
myTrap: (F-> F, F) -> F
myTrap(ff:F-> F, f:F):F ==
- s := trapNumericErrors(ff(f))$Lisp :: Union(F, "failed")
- if (s) case "failed" then
- r:F := quietDoubleNaN()$Lisp
- else
- r:F := s
- r
+ s: Maybe F := trapNumericErrors(ff(f))$Lisp
+ s case nothing => quietDoubleNaN()$Lisp
+ s
plot(f1:F -> F,f2:F -> F,f3:F -> F,col:F -> F,tRange:R) ==
p := basicPlot(point(myTrap(f1,#1),myTrap(f2,#1),myTrap(f3,#1),col(#1)),tRange)