VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
utils.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3//
4// Created by Arnis Lektauers on 14.11.2025.
5//
6#include "utils.h"
7
8namespace visutwin::canvas
9{
10 uint32_t hash32Fnv1a(const uint32_t* array, size_t length) {
11 uint32_t hash = 2166136261u;
12
13 for (size_t i = 0; i < length; i++) {
14 const uint32_t prime = 16777619;
15 hash ^= array[i];
16 hash *= prime;
17 }
18 return hash;
19 }
20}
uint32_t hash32Fnv1a(const uint32_t *array, size_t length)
Definition utils.cpp:10