Move Position destructuring functions to their own object

This commit is contained in:
Major
2018-03-28 21:36:09 +01:00
parent 3c26d0acf1
commit 9c4eff712e
3 changed files with 15 additions and 11 deletions
@@ -2,8 +2,11 @@ package org.apollo.game.plugins.api
import org.apollo.game.model.Position
// Support destructuring a Position into its components.
operator fun Position.component1(): Int = x
operator fun Position.component2(): Int = y
operator fun Position.component3(): Int = height
/**
* Support destructuring a Position into its components.
*/
object Position {
operator fun Position.component1(): Int = x
operator fun Position.component2(): Int = y
operator fun Position.component3(): Int = height
}