Implement hash proc for Godot types
This commit is contained in:
parent
4eb771e9be
commit
76de026b4f
15 changed files with 139 additions and 38 deletions
|
|
@ -1,5 +1,7 @@
|
|||
# Copyright (c) 2018 Xored Software, Inc.
|
||||
|
||||
import hashes, vector2
|
||||
|
||||
import internal.godotinternaltypes, internal.godotstrings
|
||||
import godotcoretypes, gdnativeapi
|
||||
|
||||
|
|
@ -15,6 +17,9 @@ proc initTransform2D*(xAxis, yAxis, origin: Vector2): Transform2D {.inline.} =
|
|||
proc `$`*(self: Transform2D): string {.inline.} =
|
||||
$getGDNativeAPI().transform2DAsString(self)
|
||||
|
||||
proc hash*(self: Transform2D): Hash {.inline, noinit.} =
|
||||
!$(self.elements[0].hash() !& self.elements[1].hash() !& self.elements[2].hash())
|
||||
|
||||
proc inverse*(self: Transform2D): Transform2D {.inline.} =
|
||||
getGDNativeAPI().transform2DInverse(self)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue