Try:

vspace.zipMapValues.map(descentDir, adjustedGradient, { case (d, g) => if (d * g < 0) d else 0.0})