ShapeExtensionMethods

public static class ShapeExtensionMethods
Provides extension methods for various shape/geometry classes.

Methods

public static double Area(this Cone cone, bool includeCap)
Compute the area of a cone.
cone (Cone)Cone.
includeCap (bool)If true, the flat cap is included.
Area of cone.
public static double Area(this Cylinder cylinder, bool includeCaps)
Compute the area of a cylinder.
cylinder (Cylinder)Cylinder.
includeCaps (bool)If true, the flat caps are included.
Area of cylinder.
public static double Area(this Sphere sphere)
Compute the area of a sphere.
sphere (Sphere)Cone.
Area of sphere.
public static double Area(this Torus torus)
Compute the area of a torus.
torus (Torus)Torus.
Area of torus.

Volume

#Example
public static double Volume(this Cone cone)
Compute the volume of a cone.
cone (Cone)Cone.
Volume of cone.

Volume

#Example
public static double Volume(this Cylinder cylinder)
Compute the volume of a cylinder.
cylinder (Cylinder)Cylinder.
Volume of cylinder.

Volume

#Example
public static double Volume(this Sphere sphere)
Compute the volume of a sphere.
sphere (Sphere)Cone.
Volume of sphere.

Volume

#Example
public static double Volume(this Torus torus)
Compute the volume of a torus.
torus (Torus)Torus.
Volume of torus.