mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-06 23:06:43 +02:00
refactor
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
use <../util/sum.scad>;
|
||||
|
||||
function _str_hash(value) =
|
||||
let(
|
||||
s = str(value),
|
||||
leng = len(s)
|
||||
)
|
||||
let(s = str(value))
|
||||
sum([
|
||||
for(i = [0:leng - 1])
|
||||
ord(s[i]) * 31 ^ (leng - 1 - i)
|
||||
for(i = len(s) - 1; i > -1; i = i - 1)
|
||||
ord(s[i]) * 31 ^ i
|
||||
]);
|
Reference in New Issue
Block a user