M
Martijn Mulder
System.Drawing.Drawing2D.Matrix comes in two flavors, int and float. When
doing graphics, you will you use float. Type double would be better, since
it is, when well applied, simply more acurate then float is. But things are
that there is no constructor for Matrix that accepts float.
But then, in the System.Math namespace, values like System.Math.PI and
function like Sin() and Cos() all return doubles. I can cast, of course, and
I do, but why?
Why float?
What is the reason there is a 'float' type in the first type, when you can
do all your floating point calculations with a double. CPU register size in
the hardware cannot be the reason since it is hardware specific.
doing graphics, you will you use float. Type double would be better, since
it is, when well applied, simply more acurate then float is. But things are
that there is no constructor for Matrix that accepts float.
But then, in the System.Math namespace, values like System.Math.PI and
function like Sin() and Cos() all return doubles. I can cast, of course, and
I do, but why?
Why float?
What is the reason there is a 'float' type in the first type, when you can
do all your floating point calculations with a double. CPU register size in
the hardware cannot be the reason since it is hardware specific.