LYGIA Shader Library

pow7 (lygia/math/pow7)

power of 7

Use:

<float|vec2|vec3|vec4> pow7(<float|vec2|vec3|vec4> v)

Check it on Github


#ifndef FNC_POW2
#define FNC_POW2

float pow7(const in float v) { return v * v * v * v * v * v * v; }
vec2 pow7(const in vec2 v) { return v * v * v * v * v * v * v; }
vec3 pow7(const in vec3 v) { return v * v * v * v * v * v * v; }
vec4 pow7(const in vec4 v) { return v * v * v * v * v * v * v; }

#endif

Use:

<float|float2|float3|float4> pow7(<float|float2|float3|float4> x)

Check it on Github


#ifndef FNC_POW2
#define FNC_POW2

float pow7(in float x) { return x * x * x * x * x * x * x; }
float2 pow7(in float2 x) { return x * x * x * x * x * x * x; }
float3 pow7(in float3 x) { return x * x * x * x * x * x * x; }
float4 pow7(in float4 x) { return x * x * x * x * x * x * x; }

#endif

Use:

<float|float2|float3|float4> pow7(<float|float2|float3|float4> v)

Check it on Github


#ifndef FNC_POW2
#define FNC_POW2

float pow7(const float v) { return v * v * v * v * v * v * v; }
float2 pow7(const float2 v) { return v * v * v * v * v * v * v; }
float3 pow7(const float3 v) { return v * v * v * v * v * v * v; }
float4 pow7(const float4 v) { return v * v * v * v * v * v * v; }

#endif

Dependencies:

Use:

<float|float2|float3|float4> pow7(<float|float2|float3|float4> x)

Check it on Github



#ifndef FNC_POW2
#define FNC_POW2

inline __host__ __device__ float pow7(float x) { return x * x * x * x * x * x * x; }
inline __host__ __device__ float2 pow7(const float2& x) { return x * x * x * x * x * x * x; }
inline __host__ __device__ float3 pow7(const float3& x) { return x * x * x * x * x * x * x; }
inline __host__ __device__ float4 pow7(const float4& x) { return x * x * x * x * x * x * x; }

#endif

Licenses

LYGIA is dual-licensed under the Prosperity License and the Patron License for sponsors and contributors.

Sponsors and contributors are automatically added to the Patron License and they can ignore the any non-commercial rule of the Prosperity Licensed software (please take a look to the exception).

It's also possible to get a permanent comercial license hook to a single and specific version of LYGIA.

Get the latest news and releases

Sign up for the news letter bellow, joing the LYGIA's channel on Discord or follow the Github repository