Find distance between the closest 3D points Your task is to take \$n \ge 2\$ points in 3D space, represented as 3 floating point values, and output the Euclidean distance between the two closest points. For example
$$A = (0, 0, 0) \\ B = (1, 1, 1) \\ C = (4, 0, 2)$$
would output \$\sqrt3 = 1.7320508075688772...\$, the distance between \$A\$ and \$B\$.
The Euclidean distance, \$E\$, between any two points in 3D space \$X = (a_1, b_1, c_1)\$ and \$Y = (a_2, b_2, c_2)\$ is given by the formula
$$E = \sqrt{(a_2 - a_1)^2 + (b_2 - b_1)^2 + (c_2 - c_1)^2}$$
This is code-golf so the shortest code in bytes wins
R, 34 bytes

function(...)min(dist(rbind(...)))

Try it online!
This is a nice opportunity to use R's ... syntax to define a function that can accept a variable number of arguments; in this case, the x,y,z coordinates of each point.
The dist function calculates the pairwise distance between all rows of a matrix, using a chosen method - luckily, the default is 'euclidean' and so isn't specified in this case.
Of course, it could be even shorter if we allow the input to already be combined-together as a matrix, but this wouldn't be so neat...
R, 23 bytes

function(m)min(dist(m))

Try it online!