主题:Java新手求助
public ComplexNumber complexDiv(ComplexNumber c) {
if(c.getRealPart() + c.getImaginaryPart() != 0 )
{
double r = (m_dRealPart * c.getRealPart() + m_dImaginPart * c.getImaginaryPart())/(c.getRealPart()
* c.getRealPart() + c.getImaginaryPart() * c.getImaginaryPart());
double i = (c.getRealPart() * m_dImaginPart - m_dRealPart * c.getImaginaryPart())/(c.getRealPart()
* c.getRealPart() + c.getImaginaryPart() * c.getImaginaryPart());
m_dRealPart = r;
m_dImaginPart = i;
return this;
}
else
return ???????;
}
问号这里应该写什么啊
if(c.getRealPart() + c.getImaginaryPart() != 0 )
{
double r = (m_dRealPart * c.getRealPart() + m_dImaginPart * c.getImaginaryPart())/(c.getRealPart()
* c.getRealPart() + c.getImaginaryPart() * c.getImaginaryPart());
double i = (c.getRealPart() * m_dImaginPart - m_dRealPart * c.getImaginaryPart())/(c.getRealPart()
* c.getRealPart() + c.getImaginaryPart() * c.getImaginaryPart());
m_dRealPart = r;
m_dImaginPart = i;
return this;
}
else
return ???????;
}
问号这里应该写什么啊