1 |
< |
/* Copyright (c) 1990 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
26 |
|
register double *ap; |
27 |
|
register int i; |
28 |
|
|
29 |
< |
if (so->oargs.nfargs != 4 || so->oargs.farg[3] <= FTINY) |
30 |
< |
objerror(so, USER, "bad arguments"); |
31 |
< |
|
29 |
> |
if (so->oargs.nfargs != 4) |
30 |
> |
objerror(so, USER, "bad # arguments"); |
31 |
|
ap = so->oargs.farg; |
32 |
+ |
if (ap[3] < -FTINY) { |
33 |
+ |
objerror(so, WARNING, "negative radius"); |
34 |
+ |
so->otype = so->otype == OBJ_SPHERE ? |
35 |
+ |
OBJ_BUBBLE : OBJ_SPHERE; |
36 |
+ |
ap[3] = -ap[3]; |
37 |
+ |
} else if (ap[3] <= FTINY) |
38 |
+ |
objerror(so, USER, "zero radius"); |
39 |
|
|
40 |
|
/* |
41 |
|
* We compute the intersection by substituting into |