Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor azureskyi16's Avatar
    Join Date
    Mar 2010
    Posts
    64
    hi everyone,
    I meet a strange problem, I want to get the square root vale of a number. Here are two functions I found
    1. #import <e32math.h>
    Sqrt(TReal &,const TReal &)
    2. #import <MATH.h>
    IMPORT_C double sqrt(double);

    I found these functions in SDK of N97, however, I have no idea of how to use them.
    Can anyone give me some examples of the usage of these functions? How to fill in the parameter part of these two functions?

    Thanks a lot

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,743
    You can always check the documentation.
    TReal nine=9;
    TReal three;
    TInt err=Math::Sqrt(three,nine);
    so it returns an error code, that is why it has two arguments.

  3. #3
    Regular Contributor azureskyi16's Avatar
    Join Date
    Mar 2010
    Posts
    64
    Quote Originally Posted by wizard_hu_ View Post
    You can always check the documentation.so it returns an error code, that is why it has two arguments.

    Thanks for you attention,I solved this problem.
    I add the constructer to the head file, then I use
    Math::sqrt(destination,source)
    Then it works

Similar Threads

  1. Carbide useability issues
    By lightspiritproductions in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2010-01-19, 04:26
  2. armv5 does not work in Carbide
    By symbiansamuli in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2009-06-08, 17:38
  3. Square root function parameter confusion
    By dunff2k in forum Symbian C++
    Replies: 4
    Last Post: 2009-02-06, 19:25
  4. Carbide versus Carbide Visual Studio
    By VirGin in forum Symbian Tools & SDKs
    Replies: 6
    Last Post: 2008-07-10, 02:56
  5. Help with Math, Square Root
    By howl in forum Symbian C++
    Replies: 3
    Last Post: 2008-02-13, 11:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved