mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-09 16:26:47 +02:00
refactor
This commit is contained in:
@@ -6,15 +6,5 @@ function _str_hash(value) =
|
|||||||
end = len(chars) - 1
|
end = len(chars) - 1
|
||||||
)
|
)
|
||||||
end == 0 ? ord(chars[0]) :
|
end == 0 ? ord(chars[0]) :
|
||||||
let(cum_total = [for(i = 0, s = ord(chars[i]); i < end; i = i + 1, s = s + (ord(chars[i]) * 31 ^ i)) s])
|
let(cum_total = [for(i = 0, s = ord(chars[0]); i < end; i = i + 1, s = s + (ord(chars[i]) * 31 ^ i)) s])
|
||||||
cum_total[len(cum_total) - 1] + (ord(chars[end]) * 31 ^ i);
|
cum_total[end - 1] + (ord(chars[end]) * 31 ^ end);
|
||||||
|
|
||||||
// sum([
|
|
||||||
// for(i = len(s) - 1; i > -1; i = i - 1)
|
|
||||||
// ord(s[i]) * 31 ^ i
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
let(end = len(lt) - 1)
|
|
||||||
end == 0 ? lt[0] :
|
|
||||||
let(cum_total = [for(i = 0, s = lt[0]; i < end; i = i + 1, s = s + lt[i]) s])
|
|
||||||
cum_total[len(cum_total) - 1] + lt[end];
|
|
||||||
|
Reference in New Issue
Block a user