Blender
V5.3
source
blender
gpu
shaders
common
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
7
#include "
gpu_shader_math_constants.bsl.hh
"
8
9
struct
AngleRadian
{
10
/* Note that value is public because of the lack of casting operator in GLSL. */
11
float
angle
;
12
13
static
AngleRadian
identity
()
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
};
M_PI
#define M_PI
Definition
BLI_math_constants.hh:21
gpu_shader_math_constants.bsl.hh
AngleRadian
Definition
gpu_shader_math_angle.bsl.hh:9
AngleRadian::angle
float angle
Definition
gpu_shader_math_angle.bsl.hh:11
AngleRadian::identity
static AngleRadian identity()
Definition
gpu_shader_math_angle.bsl.hh:13
AngleRadian::from_degree
static AngleRadian from_degree(float angle_degree)
Definition
gpu_shader_math_angle.bsl.hh:18
Generated on
for Blender by
doxygen
1.18.0