Diagram shows a vertical bar of length h and width b. The centroid is centered on the vertical bar along the c axis.

The equation

gives the moment of inertia of a rectangle about its own centroidal axis (axis c in the sketch).

Here is Canvas object wihch demonstrate the problem.