mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 16:49:11 +00:00
Move Position destructuring functions to their own object
This commit is contained in:
@@ -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