mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-12-06 11:17:19 +00:00
Move Position destructuring functions to their own object
This commit is contained in:
1 parent
3c26d0acf1
commit
9c4eff712e
3 files changed
+15
-11
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user