Message: Re: A small problem in a variable declaration!!! Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: A small problem in a variable declaration!!! 

Forum: Analysis
Re: Question A small problem in a variable declaration!!! (Annie Meneses)
Date: 20 Jan, 2017
From: Ivana Hrivnacova <Ivana Hrivnacova>

Hello,

You can use round() before casting the result (which is of float or double type) into an integer parameter nbins:

 #include <cmath>
 ...
 int nbins = (int) std::round(x);

Best regards,

 Add Message Add Message
to: "Re: A small problem in a variable declaration!!!"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]