Math Question

Discussion in 'General Off-Topic Chat' started by _V1qY, Jan 4, 2013.

  1. _V1qY
    OP

    _V1qY GBAtemp Regular

    Member
    138
    36
    May 31, 2012
    Simple math question which I need for my programming but I haven't been able to work out.

    I have this diagram to show how the core concept looks:

    [​IMG]

    If the diameter of the circle is 20cm, how do I calculate how long the square is diagonally?

    Thanks.
     
  2. BumFace

    BumFace GBAtemp Regular

    Member
    160
    1
    Nov 24, 2007
    UK, London
    Since diameter is 20, then i *hope* the sides are 20cm since they look tangental.

    Then, using pythagoras theorem to get diagonal length of square, i.e:

    √((20^2)+(20^2) = √800 = 20√2
     
    _V1qY likes this.
  3. DragorianSword

    DragorianSword GBAtemp's #1 Gunter

    Member
    610
    154
    Oct 31, 2008
    Belgium
    The square is 20 by 20 (you can deduce that from the diameter) so you just use Pythagoras.
    The diagonal part is the squareroot of 20^2+20^2 = 28.28
     
    _V1qY likes this.
  4. _V1qY
    OP

    _V1qY GBAtemp Regular

    Member
    138
    36
    May 31, 2012
    Thanks a lot! It's working great.