Georg Baum wrote:
> I did follow this thread, but I understood it that this should only be done
> in the frontends. But maybe I am wrong.
No, we decided to never *store* float and double values.
> In this particular case I wonder wether scale is always "0" when zero is
> meant. Maybe it is "0.0"? or "0.00" etc. I believe that this value is read
> from the .lyx file. Even if lyx always writes "0", we don't know what
> happens in lyx2lyx, tex2lyx and maybe other programs that write .lyx files.
Valid point, but AFAIR LyX itself used to write nothing in those cases.
insetexternal has
if (!float_equal(resizedata.scale, 0.0, 0.05)) {
if (!float_equal(resizedata.scale, 100.0, 0.05))
os << "\tscale "
<< resizedata.scale << '\n';
From the other side, LyX sets rotate to "0" when it does not find a scale
value in the lyx file. I do not think that any program writes an explicit
zero scale value to a lyx file (but who knows?).
So the new method only returns something different when the user enters some
value like "0.03" or an explicit "0.0" in the actual session. I see that the
latter might cause problems, but no serious ones (an unnecessary
\scalebox{0.0} will be exported, but the output looks the same). Do you think
we should care about users who insert "0.0" (no rhetoric question)?
> BTW, I appreciate what you are doing, I only want to avoid that it breaks
> something.
Sure, that's how I understand it. Please keep on reviewing.
> >> > + float rotAngle = strToDbl(angle);
> >>
> >> Why not double?
> >
> > Why double? Float is sufficient for this value.
>
> Because strToDbl returns a double. And Lars prefers it. (thread [patch]
> float -> string #1, 2004-12-20). I never use float personally, but I may be
> a bit biased (doing mainly that sort of numerics where memory is not an
> issue, but runtime).
OK, I change it to double then.
Regards and a good "Rutsch",
J�rgen