refresh my memory please

Sharky Forums


Results 1 to 2 of 2

Thread: refresh my memory please

  1. #1
    Grouchy Tech Recon's Avatar
    Join Date
    Jun 2001
    Posts
    4,963

    Post refresh my memory please

    I know im being lazy by not looking it up in the msdn but whats the sqrt function? in the cmath library?

    Thanks guys Ill be working on the other parts of my programm waiting for you guys to help me out

    im going to be using it in this type of setup
    obviosly using Hero's formula!

    //class function
    float areaTriangle()
    {

    int semiperm;
    semiperm=(side1+side2+side3)/2
    return SQRTFUNC(semiperm*(semiperm-side1)*(semiperm-side2)*(semiperm-side3))
    }


    any thoughts?

    ------------------
    Where there's a whip <crack> thers a way.
    A crack on the back says were gonna fight were gonna march all day and night and more cuz we are the slaves of the dark lord's war.

  2. #2
    Tiger Shark DeadKen's Avatar
    Join Date
    Oct 2001
    Location
    Seattle
    Posts
    800

    Post

    include <math.h>

    Its actually located in libc.lib (at least according to MSDN).



    ------------------
    I want an OS, not a hobby...
    I want an OS, not a hobby...

    Theres nothing more pathetic then someone who wears non-matching socks on purpose.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •