Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/util/math_float2.h
| Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| #endif | #endif | ||||
| ccl_device_inline float len(const float2 a) | ccl_device_inline float len(const float2 a) | ||||
| { | { | ||||
| return sqrtf(dot(a, a)); | return sqrtf(dot(a, a)); | ||||
| } | } | ||||
| ccl_device_inline float len_squared(const float2 a) | |||||
| { | |||||
| return dot(a, a); | |||||
| } | |||||
| #if !defined(__KERNEL_METAL__) | #if !defined(__KERNEL_METAL__) | ||||
| ccl_device_inline float distance(const float2 a, const float2 b) | ccl_device_inline float distance(const float2 a, const float2 b) | ||||
| { | { | ||||
| return len(a - b); | return len(a - b); | ||||
| } | } | ||||
| ccl_device_inline float cross(const float2 a, const float2 b) | ccl_device_inline float cross(const float2 a, const float2 b) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines | |||||