Blender V5.3
gpu_shader_math_angle.bsl.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
8
9struct AngleRadian {
10 /* Note that value is public because of the lack of casting operator in GLSL. */
11 float angle;
12
14 {
15 return {0};
16 }
17
18 static AngleRadian from_degree(float angle_degree)
19 {
20 return {angle_degree * (M_PI / 180.0f)};
21 }
22};
#define M_PI
static AngleRadian identity()
static AngleRadian from_degree(float angle_degree)