Results 1 to 6 of 6

Thread: Number PI

  1. #1
    Join Date
    Aug 2010
    Posts
    32
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Number PI

    Sorry for this newby question, but is the number PI defined in Qt??
    If it isnt, in which library can I find a declaration for the number PI?

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Number PI

    <math>, <math.h>

  3. #3
    Join Date
    Aug 2010
    Posts
    32
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Number PI

    Quote Originally Posted by SixDegrees View Post
    <math>, <math.h>
    Ok thanks.

    I found it also in qmath.h.

    What the difference between the math.h and qmath.h??
    I mean, if I need to call a square root function whats the difference between sqrt() and qSqrt()?
    And where can I find a square function?

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Number PI

    Asking the same thing in two places is bad form.

    See http://www.qtcentre.org/threads/4090...t-qmath.h-quot

  5. #5
    Join Date
    Apr 2011
    Posts
    16
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Number PI

    maybe the difference is (i haven't use qmath.h) qmath.h was developed using OOP or Qt "primitive" types (for example if a function of math uses char* the equivalent in qmath.h uses QString wich is better than char*...), but as i told you before, i haven't used qmath.h and almost math.h

  6. #6
    Join Date
    Apr 2011
    Posts
    124
    Thanks
    1
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows Symbian S60

    Default Re: Number PI

    qmath uses Qt data types and is sensitive to certain Qt settings.

Similar Threads

  1. defining number
    By mickey in forum General Programming
    Replies: 1
    Last Post: 1st February 2008, 06:19
  2. Number formats 00.00
    By maverick_pol in forum Qt Programming
    Replies: 21
    Last Post: 15th October 2007, 17:32
  3. SVN Revs number
    By baray98 in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2007, 23:50
  4. Set screen number
    By villy in forum Qt Programming
    Replies: 1
    Last Post: 7th September 2007, 12:56
  5. xml - get number of columns
    By wind in forum Newbie
    Replies: 3
    Last Post: 1st November 2006, 10:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.