Blender V5.3
gpu_shader_math_vector_compare.bsl.hh File Reference

Go to the source code of this file.

Functions

Comparison
template<typename VecT>
bool is_zero (VecT vec)
template bool is_zero< float2 > (float2)
template bool is_zero< float3 > (float3)
template bool is_zero< float4 > (float4)
template<typename VecT>
bool is_any_zero (VecT vec)
template bool is_any_zero< float2 > (float2)
template bool is_any_zero< float3 > (float3)
template bool is_any_zero< float4 > (float4)
template<typename VecT>
bool is_equal (VecT a, VecT b, float epsilon)
template bool is_equal< float2 > (float2, float2, float)
template bool is_equal< float3 > (float3, float3, float)
template bool is_equal< float4 > (float4, float4, float)
template<typename VecT, int dim>
bool almost_equal_relative (VecT a, VecT b, const float epsilon_factor)
template bool almost_equal_relative< float2, 2 > (float2 a, float2 b, const float epsilon_factor)
template bool almost_equal_relative< float3, 3 > (float3 a, float3 b, const float epsilon_factor)
template bool almost_equal_relative< float4, 4 > (float4 a, float4 b, const float epsilon_factor)
template<typename VecT>
bool is_unit_scale (VecT v)
template bool is_unit_scale< float2 > (float2)
template bool is_unit_scale< float3 > (float3)
template bool is_unit_scale< float4 > (float4)

Function Documentation

◆ almost_equal_relative()

template<typename VecT, int dim>
bool almost_equal_relative ( VecT a,
VecT b,
const float epsilon_factor )

Return true if the deference betweena and b is below the epsilon value. Epsilon value is scaled by magnitude of a before comparison.

Definition at line 51 of file gpu_shader_math_vector_compare.bsl.hh.

References abs, almost_equal_relative(), and b.

Referenced by almost_equal_relative(), almost_equal_relative< float2, 2 >(), almost_equal_relative< float3, 3 >(), and almost_equal_relative< float4, 4 >().

◆ almost_equal_relative< float2, 2 >()

template bool almost_equal_relative< float2, 2 > ( float2 a,
float2 b,
const float epsilon_factor )

References almost_equal_relative(), and b.

◆ almost_equal_relative< float3, 3 >()

template bool almost_equal_relative< float3, 3 > ( float3 a,
float3 b,
const float epsilon_factor )

References almost_equal_relative(), and b.

◆ almost_equal_relative< float4, 4 >()

template bool almost_equal_relative< float4, 4 > ( float4 a,
float4 b,
const float epsilon_factor )

References almost_equal_relative(), and b.

◆ is_any_zero()

template<typename VecT>
bool is_any_zero ( VecT vec)

Return true if any component is equal to zero.

Definition at line 27 of file gpu_shader_math_vector_compare.bsl.hh.

References any(), equal, and is_any_zero().

Referenced by is_any_zero(), is_any_zero< float2 >(), is_any_zero< float3 >(), and is_any_zero< float4 >().

◆ is_any_zero< float2 >()

template bool is_any_zero< float2 > ( float2 )

References is_any_zero().

◆ is_any_zero< float3 >()

template bool is_any_zero< float3 > ( float3 )

References is_any_zero().

◆ is_any_zero< float4 >()

template bool is_any_zero< float4 > ( float4 )

References is_any_zero().

◆ is_equal()

template<typename VecT>
bool is_equal ( VecT a,
VecT b,
float epsilon )

Return true if the difference betweena and b is below the epsilon value.

Definition at line 38 of file gpu_shader_math_vector_compare.bsl.hh.

References abs, all(), b, is_equal(), and lessThanEqual.

◆ is_equal< float2 >()

template bool is_equal< float2 > ( float2 ,
float2 ,
float  )

References is_equal().

◆ is_equal< float3 >()

template bool is_equal< float3 > ( float3 ,
float3 ,
float  )

References is_equal().

◆ is_equal< float4 >()

template bool is_equal< float4 > ( float4 ,
float4 ,
float  )

References is_equal().

◆ is_unit_scale()

template<typename VecT>
bool is_unit_scale ( VecT v)

Definition at line 67 of file gpu_shader_math_vector_compare.bsl.hh.

References abs, dot(), and is_unit_scale().

◆ is_unit_scale< float2 >()

template bool is_unit_scale< float2 > ( float2 )

References is_unit_scale().

◆ is_unit_scale< float3 >()

template bool is_unit_scale< float3 > ( float3 )

References is_unit_scale().

◆ is_unit_scale< float4 >()

template bool is_unit_scale< float4 > ( float4 )

References is_unit_scale().

◆ is_zero()

template<typename VecT>
bool is_zero ( VecT vec)

Return true if all components is equal to zero.

Definition at line 16 of file gpu_shader_math_vector_compare.bsl.hh.

References all(), equal, and is_zero().

◆ is_zero< float2 >()

template bool is_zero< float2 > ( float2 )

References is_zero().

◆ is_zero< float3 >()

template bool is_zero< float3 > ( float3 )

References is_zero().

◆ is_zero< float4 >()

template bool is_zero< float4 > ( float4 )

References is_zero().