| 212 | } |
| 213 | |
| 214 | void RandomSphere(vtkRandom* seq, const double radius, const double* offset, double* value) |
| 215 | { |
| 216 | // Generate a point on a sphere. |
| 217 | |
| 218 | seq->Next(); |
| 219 | double theta = 2. * vtkMath::Pi() * seq->GetValue(); |
| 220 | seq->Next(); |
| 221 | double phi = vtkMath::Pi() * seq->GetValue(); |
| 222 | value[0] = radius * cos(theta) * sin(phi) + offset[0]; |
| 223 | value[1] = radius * sin(theta) * sin(phi) + offset[1]; |
| 224 | value[2] = radius * cos(phi) + offset[2]; |
| 225 | } |
| 226 | |
| 227 | int TestNegativeResult(vtkRandom* seq, unsigned nTests) |
| 228 | { |
no test coverage detected