Straightforward solution with plain Scala and anonymous lambda, without any mappings, folds, Double.{Min/Max}Value, and so on:
def restrict(floor : Option[Double], cap : Option[Double], amt : Double) : Double =
((x:Double) => x min cap.getOrElse(x))(amt max floor.getOrElse(amt))