Sphere

geometry. Sphere

# new Sphere()

Formulas related to spheres.

Methods

# area(r) → {number}

Calculates the surface area of a sphere
Parameters:
Name Type Description
r number radius
Returns:
4πr²
Type
number
Example
mathform.geometry.Sphere.area(2) // ~50.27

# volume(r) → {number}

Calculates the volume of a sphere
Parameters:
Name Type Description
r number radius
Returns:
(43)πr³
Type
number
Example
mathform.geometry.Sphere.volume(2) // ~33.51