Could someone convert a little c maths code for me

Miscellaneous Forums/General Discussion/Could someone convert a little c maths code for me

Thanks guys. I haven't taken a break from reading/writing/converting c code in a few days and I think it's driven me a bit batchy. I'll make the necessary changes and see if that was the problem or if there's an error in my dll wrapper.