Math Question

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

Jan 4, 2013

Math Question by _V1qY at 5:16 PM (277 Views / 0 Likes) 3 replies

  1. _V1qY
    OP

    Member _V1qY GBAtemp Regular

    Joined:
    May 31, 2012
    Messages:
    138
    Country:
    United Kingdom
    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

    Member BumFace GBAtemp Regular

    Joined:
    Nov 24, 2007
    Messages:
    160
    Location:
    UK, London
    Country:
    United Kingdom
    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

    Member DragorianSword GBAtemp's #1 Gunter

    Joined:
    Oct 31, 2008
    Messages:
    598
    Country:
    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

    Member _V1qY GBAtemp Regular

    Joined:
    May 31, 2012
    Messages:
    138
    Country:
    United Kingdom
    Thanks a lot! It's working great.
     

Share This Page