mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-15 08:06:06 +09:00
fixed a bug where wires won't pop up as the camera moves
This commit is contained in:
@@ -288,6 +288,12 @@ class Vector2 {
|
||||
this.y = y
|
||||
}
|
||||
|
||||
fun setPolar(magnitude: Double, direction: Double) {
|
||||
this.x = Math.cos(direction) * magnitude
|
||||
this.y = Math.sin(direction) * magnitude
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the x component of this [Vector2].
|
||||
* @return [Vector2]
|
||||
|
||||
Reference in New Issue
Block a user