comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: rounding numbers
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: rounding numbers [message #82925 is a reply to message #82924] Wed, 23 January 2013 14:03 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
justinclouds writes:

>
> I would like to be able to round up number of seconds since midnight as follows:
>
> round down 61825 to 61000
> round up 61825 to 62000
>
> Is there an IDL function that does this and what is the syntax?

IDL> Print, Floor(Float(61825) / 10^3) * 10^3
61000
IDL> Print, Ceil(Float(61825) / 10^3) * 10^3
62000

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: rounding numbers
Next Topic: Re: CgWindow and multiple plots

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 04:21:08 PDT 2025

Total time taken to generate the page: 1.36364 seconds