Changed: #878 Fix typos in comments/code

This commit is contained in:
kervala 2011-06-04 13:48:27 +02:00
parent abdc28945f
commit 5d87c7e823
3 changed files with 16 additions and 10 deletions

View file

@ -76,10 +76,12 @@ protected:
public:
CContentItems( UINT nID, CString str ) :
m_nImageID( nID ), m_csText( str ) {
m_nImageID( nID ), m_csText( str )
{
}
void operator = ( CContentItems& pItems ) {
void operator = ( CContentItems& pItems )
{
m_nImageID = pItems.m_nImageID;
m_csText = pItems.m_csText;
}

View file

@ -568,8 +568,8 @@ void CCoolDialogBar::DrawGripper(CDC & dc)
ScreenToClient( gripper );
gripper.OffsetRect( -gripper.left, -gripper.top );
if( m_dwStyle & CBRS_ORIENT_HORZ ) {
if( m_dwStyle & CBRS_ORIENT_HORZ )
{
// gripper at left
m_rectGripper.top = gripper.top + 40;
m_rectGripper.bottom = gripper.bottom;
@ -597,9 +597,8 @@ void CCoolDialogBar::DrawGripper(CDC & dc)
gripper.OffsetRect(4, 0);
dc.Draw3dRect( gripper, m_clrBtnHilight, m_clrBtnShadow );
}
else {
else
{
// gripper at top
m_rectGripper.top = gripper.top;
m_rectGripper.bottom = gripper.top + 20;

View file

@ -258,15 +258,20 @@ void CListenerView::OnDraw(CDC* dc)
// linearly descending volume on a dB scale
double db1 = -100.0 * (x - _MinDist) / (_MaxDist - _MinDist);
if (_Alpha == 0.0) {
if (_Alpha == 0.0)
{
y = db1;
} else if (_Alpha > 0.0) {
}
else if (_Alpha > 0.0)
{
double amp2 = 0.0001 + 0.9999 * (_MaxDist - x) / (_MaxDist - _MinDist); // linear amp between 0.00001 and 1.0
double db2 = 20. * log10(amp2);
y = ((1.0 - _Alpha) * db1 + _Alpha * db2);
} else if (_Alpha < 0.0) {
}
else if (_Alpha < 0.0)
{
double amp3 = _MinDist / x; // linear amplitude is 1/distance
double db3 = 20.0 * log10(amp3);
y = ((1.0 + _Alpha) * db1 - _Alpha * db3);