![]() |
Truncate decimal part of angle (DEG) - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Truncate decimal part of angle (DEG) (/thread-4174.html) |
Truncate decimal part of angle (DEG) - salvomic - 06-18-2015 10:28 AM hi, what's the command to truncate the decimal part of an angle (DEG format). I mean: I've 3°12'22".12345 and I want 3°12'22" without the .12345 Using IP() I get 3°00'00", with truncate() I get 3°12'22.12345" ... thank you, Salvo RE: Truncate decimal part of angle (DEG) - DrD - 06-18-2015 11:47 AM For that specific example, 3°12′22.12345″, this works: LEFT(STRING(3°12′22.12345″),7) --> "3°12′22" You can probably figure out a more general approach. RE: Truncate decimal part of angle (DEG) - salvomic - 06-18-2015 11:59 AM (06-18-2015 11:47 AM)DrD Wrote: For that specific example, 3°12′22.12345″, this works: good idea, Dale, thank you. I'm thinking about it... RE: Truncate decimal part of angle (DEG) - Didier Lachieze - 06-18-2015 12:11 PM This should work with any angle: →HMS((IP(HMS→(3°12′22.12345″)*3600)/3600)) RE: Truncate decimal part of angle (DEG) - salvomic - 06-18-2015 12:14 PM (06-18-2015 12:11 PM)Didier Lachieze Wrote: This should work with any angle: simple, but great! it works, thank you. Salvo |