So im trying to do a when statement for when a is in a certain degree of 360, this is the method I'm currently using:
var a: Double = 0.0
...
primaryDirection = when (a) {
in 45..135 -> Direction.RIGHT
in 135..225 -> Direction.DOWN
in 225..315 -> Direction.LEFT
else -> Direction.UP
}
However each of the in keywords is saying that it's deprecated... So what should I replace this with?
