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
|
||||
|
||||
import internal.godotinternaltypes, internal.godotstrings
|
||||
import godotcoretypes, gdnativeapi
|
||||
|
||||
|
|
@ -17,6 +19,9 @@ proc initQuat*(axis: Vector3; angle: float32): Quat {.inline.} =
|
|||
proc `$`*(self: Quat): string {.inline.} =
|
||||
$getGDNativeAPI().quatAsString(self)
|
||||
|
||||
proc hash*(self: Quat): Hash {.inline.} =
|
||||
!$(self.x.hash() !& self.y.hash() !& self.z.hash() !& self.w.hash())
|
||||
|
||||
proc length*(self: Quat): float32 {.inline.} =
|
||||
getGDNativeAPI().quatLength(self)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue