class_name ServerWorldPosition
extends RefCounted

## Immutable TrinityCore/AzerothCore world position in wire/database X/Y/Z order.
## Units are WoW yards. A distinct type prevents server positions from being
## passed directly to renderer APIs even though the scalar values are canonical.

var x_yards: float:
	get:
		return _x_yards

var y_yards: float:
	get:
		return _y_yards

var z_yards: float:
	get:
		return _z_yards

var _x_yards: float
var _y_yards: float
var _z_yards: float


## Creates a server position without changing precision or validating map bounds.
func _init(x_yards_value: float, y_yards_value: float, z_yards_value: float) -> void:
	_x_yards = x_yards_value
	_y_yards = y_yards_value
	_z_yards = z_yards_value
