// ChanAB.cxx

#include "ChanAB.h"
#include "1stOrder.h"

void ChanAB::UpdateM( const real dt )
{
	if (Mexp) {
		// compute M using first-order kinetics:
		//	dM/dt = alpha*(1-M) - beta*M
		real v = itsComp->GetV();
		M = FirstOrder( M, AlphaM(v), BetaM(v), dt );
	}
}

void ChanAB::UpdateH( const real dt )
{
	if (Hexp) {
		// compute H using first-order kinetics:
		//	dH/dt = alpha*(1-H) - beta*H
		real v = itsComp->GetV();
		H = FirstOrder( H, AlphaH(v), BetaH(v), dt );
	}
}
