VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Jul 12 2011 - 11:58:55 CDT
- Next message: Ajasja Ljubetič: "Re: script"
- Previous message: Ajasja Ljubetič: "Re: script"
- In reply to: KIRTANA S: "script"
- Next in thread: Ajasja Ljubetič: "Re: script"
- Reply: Ajasja Ljubetič: "Re: script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Tue, Jul 12, 2011 at 12:12 PM, KIRTANA S <skirtana4_at_gmail.com> wrote:
> How can I round off a number to nearest whole number using tcl .I
> tried using round (), whihc is not recognized .
nonsense. round() works well:
vmd > puts "[expr { round(0.1)}]"
0
vmd > puts "[expr { round(1.1)}]"
1
vmd > puts "[expr { round(-0.1)}]"
0
vmd > puts "[expr { round(-1.1)}]"
-1
axel.
> expr{} works . Can you tell me if I need to import any library to use
> the math in tcl.
>
> thank you
>
-- Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0 Institute for Computational Molecular Science Temple University, Philadelphia PA, USA.
- Next message: Ajasja Ljubetič: "Re: script"
- Previous message: Ajasja Ljubetič: "Re: script"
- In reply to: KIRTANA S: "script"
- Next in thread: Ajasja Ljubetič: "Re: script"
- Reply: Ajasja Ljubetič: "Re: script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]