float or scalar for runTime.tinename() ??
I had look around but I'm not finding a method to call to provide the time the simulation is on.. I wan't to make a change when time = changetime..
I have tried to do casting like: float(runTime.timeName()) but it do not work.... I'm starting to believe I will have to implement the casting.. |
Hi Fábio,
Type casting only works when the variables are similar, for example between pointers and between double/int/float and so on. To convert a string to float, you can use atof. But I think that runTime.value() will get you the value already in scalar (float or double) format, without the need to convert the value. Best regards, Bruno |
LOL ...
Thanks Bruno, I had looked at the doxygen but the method "value()" was not there, I believe it's because it is from inheritance.. |
Quote:
Quote:
|
All times are GMT -4. The time now is 00:46. |