Blender V5.3
gpu_shader_material_float_to_int.bsl.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
8
9[[node]]
10void float_to_int_round(float value, int &result)
11{
12 result = int(round(value));
13}
14
15[[node]]
16void float_to_int_floor(float value, int &result)
17{
18 result = int(floor(value));
19}
20
21[[node]]
22void float_to_int_ceil(float value, int &result)
23{
24 result = int(ceil(value));
25}
26
27[[node]]
28void float_to_int_truncate(float value, int &result)
29{
30 result = int(trunc(value));
31}
#define round
#define trunc
#define floor
#define ceil
void float_to_int_truncate(float value, int &result)
void float_to_int_ceil(float value, int &result)
void float_to_int_floor(float value, int &result)
void float_to_int_round(float value, int &result)