Hello. I wrote a function to convert Latitude and Longitude in degree decimal format to DMS.xxx format. If I have 32.4640245 as a latitude, the function converts it to: 323750.484, which seems to be fine.
Problem: If I have the value -86.4596966, then my function seems to have an error with INT. Taking the INT of the value above (32.4640245), it returns 32. However, taking INT of -86.4596966 returns -87, not -86 for this to work. I seem to need the -86. What do I need to do to correct this?
Or, is there a premade tested function that I can use?
Thank you.
Robert
Problem: If I have the value -86.4596966, then my function seems to have an error with INT. Taking the INT of the value above (32.4640245), it returns 32. However, taking INT of -86.4596966 returns -87, not -86 for this to work. I seem to need the -86. What do I need to do to correct this?
Or, is there a premade tested function that I can use?
Thank you.
Robert
Comment