A
A
Alex Bezrukov2014-11-19 21:57:37
Java
Alex Bezrukov, 2014-11-19 21:57:37

How to find the volume of a regular pyramid?

Good day. I solve a problem and need to find the volume of a regular pyramid using the formula V = (n * Moth.pow(a, 2) * h) / (12 * tg * (180 degrees / n))
where h is the height of the pyramid, n is the number of sides in base, Moth.pow(a, 2) - base side (a squared), tg - tangent. I don’t understand how to represent tangent and 180 degrees in the code.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Ext4, 2014-11-19
@valiofin

V = (n * Math.pow(a, 2) * h) / (12 * Math.tan( Math.toRadians(180.0 / n) ) )
Math.tan()
Math.toRadians()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question