[Turn off line numbering]1: arg coords; 2: var r, phi, theta, r1; 3: 4: r = coords[1]; 5: phi = coords[2]; 6: theta = coords[3]; 7: r1 = r * cos(theta); 8: return [r1 * cos(phi), r1 * sin(phi), r * sin(theta)];
// Miroslav Silovic
// Created 19-Oct-1996 as a part of ColdCore, see: @help Credit