How do I match multiple arguments?
You can pattern match all described cases like this:
def func(a: Int, b: Int, c: Double) = (a, b, c) match {
case (a, b, 0) => b - a
case (a, b, c) if c > 9 || a == b => 0
case _ => 1 // add your logic here
}
Following on from my comments to Easy Angel's answer, I still feel this
if (c == 0)
b -a
else if (c > 9)
0
else if (a == b)
0
else
1 // your logic here
is clearer. Basically because there isn't really any pattern to match here.