Advertisement
Guest User

Untitled

a guest
May 28th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1.             // To determine tank volume, we start with cylinder volume based on diameter and height
  2.             // Then calculate a sphere of diameter size.  This represents the two half domes on top and bottom
  3.             float radius = this.tankComponent.GetFloatProperty("Diameter") / 2.0f;
  4.             float height = this.tankComponent.GetFloatProperty("Height");
  5.             float cylinderVolume = Mathf.PI * radius * radius * height;
  6.             float sphereVolume = 1.33f * Mathf.PI * radius * radius * radius;
  7.             float totalVolume = (cylinderVolume + sphereVolume) * utilization;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement