Simple power-up question
-
It says I can't power up a double and a double
double a = 1.8;
double b = 2.9;a = a ^ b ;
any ideas?
b cannot be a double, that is correct.
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
-
It says I can't power up a double and a double
double a = 1.8;
double b = 2.9;a = a ^ b ;
any ideas?
Use
Math.Pow()
instead. H. -
It says I can't power up a double and a double
double a = 1.8;
double b = 2.9;a = a ^ b ;
any ideas?
<code>^</code> is the logical <a href="http://msdn.microsoft.com/en-us/library/zkacc7k1(VS.80).aspx">XOR</a>[<a href="http://msdn.microsoft.com/en-us/library/zkacc7k1(VS.80).aspx" target="_blank" title="New Window">^</a>] operator. As was mentioned upthread you need to use <code>Math.Pow</code>.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains. -- Pride and Prejudice and Zombies
-
Use
Math.Pow()
instead. H. -
<code>^</code> is the logical <a href="http://msdn.microsoft.com/en-us/library/zkacc7k1(VS.80).aspx">XOR</a>[<a href="http://msdn.microsoft.com/en-us/library/zkacc7k1(VS.80).aspx" target="_blank" title="New Window">^</a>] operator. As was mentioned upthread you need to use <code>Math.Pow</code>.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains. -- Pride and Prejudice and Zombies
Did you ever screw that one up ;P
Never underestimate the power of human stupidity RAH