# Division problem

Tomm Schuman

Greenhorn

Posts: 11

Carol Enderlin

drifter

Ranch Hand

Ranch Hand

Posts: 1364

Prashanth Lingala

Ranch Hand

Posts: 66

Tomm Schuman

Greenhorn

Posts: 11

Layne Lund

Ranch Hand

Posts: 3061

posted 11 years ago

Using a little bit of trigonometry, you can set up an equation:

Solving this for x, you get

You can convert this almost directly into Java using the Math class:

The Math class also provides methods for cosine, tangent, and other nifty mathematical functions. See the link provided above for the Javadocs for this class.

HTH

Layne

[ March 10, 2005: Message edited by: Layne Lund ]

Solving this for x, you get

You can convert this almost directly into Java using the Math class:

The Math class also provides methods for cosine, tangent, and other nifty mathematical functions. See the link provided above for the Javadocs for this class.

HTH

Layne

[ March 10, 2005: Message edited by: Layne Lund ]

Surasak Leenapongpanit

Ranch Hand

Posts: 341