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 vector3
|
||||
|
||||
import internal.godotinternaltypes, internal.godotstrings
|
||||
|
|
@ -20,6 +22,9 @@ proc initPlane*(normal: Vector3; d: float32): Plane {.inline.} =
|
|||
proc `$`*(self: Plane): string {.inline.} =
|
||||
$getGDNativeAPI().planeAsString(self)
|
||||
|
||||
proc hash*(self: Plane): Hash {.inline, noinit.} =
|
||||
!$(self.normal.hash() !& self.d.hash())
|
||||
|
||||
proc normalized*(self: Plane): Plane {.inline.} =
|
||||
getGDNativeAPI().planeNormalized(self)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue