N-dimensional Circles! Write a program that takes two numbers as its input. The first one is the number of dimensions - 0 for a dot, 1 for a straight line, 2 for a circle, 3 for a sphere. The second number is the radius of the object, or, if it's 1-dimensional, the number itself. Output 0 for 0 dimensions. The output is the length/area/volume of the object.

If we call the first number n, the second one r, and the output x, we get that:


for n = 0, x = 1
for n = 1, x = 2×r
for n = 2, x = r2×π
for n = 3, x = (4/3)×r3×π
and so on... if you want, though.


Notes: 


Cases when one or both numbers are negative, or when the first number is not whole, don't need to be covered.
The program must not read from any file and the only input are those two numbers.
The output should use only numerals (e.g. not "14*pi"), and should be accurate to at least two decimal digits.
As for n = 0, you can output 0 if it makes the code shorter.
Extra swag for an answer covering even 4 and more-dimensional "spheres"!
It's code-golf, so the shortest answer in bytes wins!


Examples:

 1 1 -&gt; 2

 2 3 -&gt; 28,27

 3 1 -&gt; 4,19

 3 4,5 -&gt; 381,70

 1 9.379 -&gt; 18.758

 0 48 -&gt; 1
Mathematica, 18 bytes, up to ~168.15 trillion dimensions

Pi^(a=.5#)/a!#2^#&amp;


Anonymous function. Takes two numbers as input, and returns an inexact number as output. Works with any number of dimensions. Outputs 1. for n = 0. Uses the formula from Volume of an n-ball on Wikipedia.

Explanation

We are attempting to compute &pi;n/2/&Gamma;(n/2 + 1)&middot;Rn, or N[Pi^(n/2)/Gamma[n/2 + 1] R^n] in Mathematica. In our case, # (first argument) is n and #2 (second argument) is R. This leaves us with N[Pi^(#/2)/Gamma[#/2 + 1] #2^#] &amp;, which can be golfed as follows:

N[Pi^(#/2)/Gamma[#/2 + 1] #2^#] &amp;
Pi^(.5#)/Gamma[.5# + 1] #2^# &amp;    (* replace exact with approximate numbers*)
Pi^(.5#)/(.5#)! #2^# &amp;            (* n! == Gamma[n + 1] *)
Pi^(a=.5#)/a! #2^# &amp;              (* replace repeated .5# *)
Pi^(a=.5#)/a!#2^#&amp;                (* remove whitespace *)


and thus, our original program.