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,6 +1,7 @@
|
|||
# Copyright (c) 2018 Xored Software, Inc.
|
||||
|
||||
import math
|
||||
import math, hashes
|
||||
|
||||
import godotbase, vector3, quats
|
||||
import godotcoretypes
|
||||
|
||||
|
|
@ -201,6 +202,9 @@ proc `$`*(self: Basis): string {.inline.} =
|
|||
result.add(", ")
|
||||
result.add($self[i][j])
|
||||
|
||||
proc hash*(self: Basis): Hash {.inline.} =
|
||||
!$(self.elements[0].hash() !& self.elements[1].hash() !& self.elements[2].hash())
|
||||
|
||||
template cofac(row1, col1, row2, col2: int): float32 =
|
||||
self.elements[row1][col1] * self.elements[row2][col2] -
|
||||
self.elements[row1][col2] * self.elements[row2][col1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue