I believen mine formula works for even and odd, measuring the height if it is even from midpoint to midpoint, and if it is odd, from midpoint to vertex.
Now, you can make a triangle from vertex-center-midpoint with a height of .5h. The angles are going to look like 90, 180/s, and 90-180/s bc of the formula thingy, and you can just take a tangent and multiply for the base, which you then multiply by 2s in order to spread around every single side.
So s*h*tan(90-180/s).
I see yours is right, but no understandy why mine wrong.