using System.Diagnostics.Contracts; using System.Numerics; using ComputeSharp.Graphics.Exceptions; namespace ComputeSharp { /// /// A that maps the supported HLSL intrinsic functions that can be used in compute shaders /// public static class Hlsl { /// /// Returns the absolute value of the specified value /// /// The specified value /// The absolute value of the parameter [Pure] public static int Abs(int x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Abs)}(int)"); /// /// Returns the absolute value of the specified value /// /// The specified value /// The absolute value of the parameter [Pure] public static float Abs(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Abs)}(float)"); /// /// Returns the absolute value of the specified value /// /// The specified value /// The absolute value of the parameter [Pure] public static Vector2 Abs(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Abs)}({nameof(Vector2)})"); /// /// Returns the absolute value of the specified value /// /// The specified value /// The absolute value of the parameter [Pure] public static Vector3 Abs(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Abs)}({nameof(Vector3)})"); /// /// Returns the absolute value of the specified value /// /// The specified value /// The absolute value of the parameter [Pure] public static Vector4 Abs(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Abs)}({nameof(Vector4)})"); /// /// Returns the arccosine of the specified value /// /// The specified value, which should be within the range [-1 to 1] /// The arccosine of the parameter [Pure] public static float Acos(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Acos)}(float)"); /// /// Returns the arccosine of the specified value /// /// The specified value, where each component should be within the range [-1 to 1] /// The arccosine of the parameter [Pure] public static Vector2 Acos(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Acos)}({nameof(Vector2)})"); /// /// Returns the arccosine of the specified value /// /// The specified value, where each component should be within the range [-1 to 1] /// The arccosine of the parameter [Pure] public static Vector3 Acos(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Acos)}({nameof(Vector3)})"); /// /// Returns the arccosine of the specified value /// /// The specified value, where each component should be within the range [-1 to 1] /// The arccosine of the parameter [Pure] public static Vector3 Acos(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Acos)}({nameof(Vector4)})"); /// /// Determines if all components of the specified value are non-zero /// /// The specified value /// if all components of the parameter are non-zero; otherwise, [Pure] public static bool All(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(All)}({nameof(Vector2)})"); /// /// Determines if all components of the specified value are non-zero /// /// The specified value /// if all components of the parameter are non-zero; otherwise, [Pure] public static bool All(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(All)}({nameof(Vector3)})"); /// /// Determines if all components of the specified value are non-zero /// /// The specified value /// if all components of the parameter are non-zero; otherwise, [Pure] public static bool All(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(All)}({nameof(Vector4)})"); /// /// Determines if any components of the specified value are non-zero /// /// The specified value /// if any components of the parameter are non-zero; otherwise, [Pure] public static bool Any(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Any)}({nameof(Vector2)})"); /// /// Determines if any components of the specified value are non-zero /// /// The specified value /// if any components of the parameter are non-zero; otherwise, [Pure] public static bool Any(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Any)}({nameof(Vector3)})"); /// /// Determines if any components of the specified value are non-zero /// /// The specified value /// if any components of the parameter are non-zero; otherwise, [Pure] public static bool Any(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Any)}({nameof(Vector4)})"); /// /// Returns the arcsine of the specified value /// /// The specified value, which should be within the range [-1 to 1] /// The arcsine of the parameter [Pure] public static float Asin(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Asin)}(float)"); /// /// Returns the arcsine of the specified value /// /// The specified value, where each component should be within the range [-1 to 1] /// The arcsine of the parameter [Pure] public static Vector2 Asin(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Asin)}({nameof(Vector2)})"); /// /// Returns the arcsine of the specified value /// /// The specified value, where each component should be within the range [-1 to 1] /// The arcsine of the parameter [Pure] public static Vector3 Asin(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Asin)}({nameof(Vector3)})"); /// /// Returns the arcsine of the specified value /// /// The specified value, where each component should be within the range [-1 to 1] /// The arcsine of the parameter [Pure] public static Vector3 Asin(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Asin)}({nameof(Vector4)})"); /// /// Returns the arctangent of the specified value /// /// The specified value /// The arctangent of the parameter [Pure] public static float Atan(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Atan)}(float)"); /// /// Returns the arctangent of the specified value /// /// The specified value /// The arctangent of the parameter [Pure] public static Vector2 Atan(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Atan)}({nameof(Vector2)})"); /// /// Returns the arctangent of the specified value /// /// The specified value /// The arctangent of the parameter [Pure] public static Vector3 Atan(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Atan)}({nameof(Vector3)})"); /// /// Returns the arctangent of the specified value /// /// The specified value /// The arctangent of the parameter [Pure] public static Vector3 Atan(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Atan)}({nameof(Vector4)})"); /// /// Returns the arctangent of two values (,) /// /// The value /// The value /// The arctangent of (,) [Pure] public static float Atan2(float y, float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Atan2)}(float,float)"); /// /// Returns the arctangent of two values (,) /// /// The value /// The value /// The arctangent of (,) [Pure] public static Vector2 Atan2(Vector2 y, Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Atan2)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Returns the arctangent of two values (,) /// /// The value /// The value /// The arctangent of (,) [Pure] public static Vector3 Atan2(Vector3 y, Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Atan2)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Returns the arctangent of two values (,) /// /// The value /// The value /// The arctangent of (,) [Pure] public static Vector3 Atan2(Vector4 y, Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Atan2)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Returns the smallest integer value that is greater than or equal to the specified value /// /// The specified value /// The smallest integer value (returned as a floating-point type) that is greater than or equal to the parameter [Pure] public static float Ceil(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ceil)}(float)"); /// /// Returns the smallest integer value that is greater than or equal to the specified value /// /// The specified value /// The smallest integer value (returned as a floating-point type) that is greater than or equal to the parameter [Pure] public static Vector2 Ceil(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ceil)}({nameof(Vector2)})"); /// /// Returns the smallest integer value that is greater than or equal to the specified value /// /// The specified value /// The smallest integer value (returned as a floating-point type) that is greater than or equal to the parameter [Pure] public static Vector3 Ceil(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ceil)}({nameof(Vector3)})"); /// /// Returns the smallest integer value that is greater than or equal to the specified value /// /// The specified value /// The smallest integer value (returned as a floating-point type) that is greater than or equal to the parameter [Pure] public static Vector3 Ceil(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ceil)}({nameof(Vector4)})"); /// /// Clamps the specified value to the specified minimum and maximum range /// /// A value to clamp /// The specified minimum range /// The specified maximum range /// The clamped value for the x parameter /// For values of -INF or INF, clamp will behave as expected. However for values of NaN, the results are undefined [Pure] public static int Clamp(int x, int min, int max) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Clamp)}(int,int,int)"); /// /// Clamps the specified value to the specified minimum and maximum range /// /// A value to clamp /// The specified minimum range /// The specified maximum range /// The clamped value for the x parameter /// For values of -INF or INF, clamp will behave as expected. However for values of NaN, the results are undefined [Pure] public static float Clamp(float x, float min, float max) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Clamp)}(float,float,float)"); /// /// Clamps the specified value to the specified minimum and maximum range /// /// A value to clamp /// The specified minimum range /// The specified maximum range /// The clamped value for the x parameter /// For values of -INF or INF, clamp will behave as expected. However for values of NaN, the results are undefined [Pure] public static Vector2 Clamp(Vector2 x, Vector2 min, Vector2 max) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Clamp)}({nameof(Vector2)},{nameof(Vector2)},{nameof(Vector2)})"); /// /// Clamps the specified value to the specified minimum and maximum range /// /// A value to clamp /// The specified minimum range /// The specified maximum range /// The clamped value for the x parameter /// For values of -INF or INF, clamp will behave as expected. However for values of NaN, the results are undefined [Pure] public static Vector3 Clamp(Vector3 x, Vector3 min, Vector3 max) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Clamp)}({nameof(Vector3)},{nameof(Vector3)},{nameof(Vector3)})"); /// /// Clamps the specified value to the specified minimum and maximum range /// /// A value to clamp /// The specified minimum range /// The specified maximum range /// The clamped value for the x parameter /// For values of -INF or INF, clamp will behave as expected. However for values of NaN, the results are undefined [Pure] public static Vector4 Clamp(Vector4 x, Vector4 min, Vector4 max) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Clamp)}({nameof(Vector4)},{nameof(Vector4)},{nameof(Vector4)})"); /// /// Returns the cosine of the specified value /// /// The specified value, in radians /// The cosine of the parameter [Pure] public static float Cos(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Cos)}(float)"); /// /// Returns the cosine of the specified value /// /// The specified value, in radians /// The cosine of the parameter [Pure] public static Vector2 Cos(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Cos)}({nameof(Vector2)})"); /// /// Returns the cosine of the specified value /// /// The specified value, in radians /// The cosine of the parameter [Pure] public static Vector3 Cos(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Cos)}({nameof(Vector3)})"); /// /// Returns the cosine of the specified value /// /// The specified value, in radians /// The cosine of the parameter [Pure] public static Vector3 Cos(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Cos)}({nameof(Vector4)})"); /// /// Returns the hyperbolic cosine of the specified value /// /// The specified value, in radians /// The hyperbolic cosine of the parameter [Pure] public static float Cosh(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Cosh)}(float)"); /// /// Returns the hyperbolic cosine of the specified value /// /// The specified value, in radians /// The hyperbolic cosine of the parameter [Pure] public static Vector2 Cosh(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Cosh)}({nameof(Vector2)})"); /// /// Returns the hyperbolic cosine of the specified value /// /// The specified value, in radians /// The hyperbolic cosine of the parameter [Pure] public static Vector3 Cosh(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Cosh)}({nameof(Vector3)})"); /// /// Returns the hyperbolic cosine of the specified value /// /// The specified value, in radians /// The hyperbolic cosine of the parameter [Pure] public static Vector3 Cosh(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Cosh)}({nameof(Vector4)})"); /// /// Counts the number of bits in the input value /// /// The input value /// The number of bits [Pure] public static uint CountBits(uint x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(CountBits)}({nameof(Vector4)})"); /// /// Returns the cross product of two values /// /// The first vector /// The second vector /// The cross product of the parameter and the parameter [Pure] public static Vector3 Cross(Vector3 x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Cross)}({nameof(Vector3)})"); /// /// Converts the specified value from radians to degrees /// /// The specified value /// The result of converting the parameter from radians to degrees [Pure] public static float Degrees(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Degrees)}(float)"); /// /// Converts the specified value from radians to degrees /// /// The specified value /// The result of converting the parameter from radians to degrees [Pure] public static Vector2 Degrees(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Degrees)}({nameof(Vector2)})"); /// /// Converts the specified value from radians to degrees /// /// The specified value /// The result of converting the parameter from radians to degrees [Pure] public static Vector3 Degrees(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Degrees)}({nameof(Vector3)})"); /// /// Converts the specified value from radians to degrees /// /// The specified value /// The result of converting the parameter from radians to degrees [Pure] public static Vector3 Degrees(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Degrees)}({nameof(Vector4)})"); /// /// Returns a distance scalar between two values /// /// The first value to compare /// The second value to compare /// A scalar value that represents the distance between the parameter and the parameter [Pure] public static float Distance(Vector2 x, Vector2 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Distance)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Returns a distance scalar between two values /// /// The first value to compare /// The second value to compare /// A scalar value that represents the distance between the parameter and the parameter [Pure] public static float Distance(Vector3 x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Distance)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Returns a distance scalar between two values /// /// The first value to compare /// The second value to compare /// A scalar value that represents the distance between the parameter and the parameter [Pure] public static float Distance(Vector4 x, Vector4 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Distance)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Returns the dot product of two values /// /// The first vector /// The second vector /// The dot product of the parameter and the parameter [Pure] public static float Dot(Vector2 x, Vector2 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Dot)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Returns the dot product of two values /// /// The first vector /// The second vector /// The dot product of the parameter and the parameter [Pure] public static float Dot(Vector3 x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Dot)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Returns the dot product of two values /// /// The first vector /// The second vector /// The dot product of the parameter and the parameter [Pure] public static float Dot(Vector4 x, Vector4 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Dot)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Returns the base-e exponential of the specified value /// /// The specified value /// The base-e exponential of the parameter [Pure] public static float Exp(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Exp)}(float)"); /// /// Returns the base-e exponential of the specified value /// /// The specified value /// The base-e exponential of the parameter [Pure] public static Vector2 Exp(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Exp)}({nameof(Vector2)})"); /// /// Returns the base-e exponential of the specified value /// /// The specified value /// The base-e exponential of the parameter [Pure] public static Vector3 Exp(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Exp)}({nameof(Vector3)})"); /// /// Returns the base-e exponential of the specified value /// /// The specified value /// The base-e exponential of the parameter [Pure] public static Vector4 Exp(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Exp)}({nameof(Vector4)})"); /// /// Returns the base-2 exponential of the specified value /// /// The specified value /// The base-2 exponential of the parameter [Pure] public static float Exp2(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Exp2)}(float)"); /// /// Returns the base-2 exponential of the specified value /// /// The specified value /// The base-2 exponential of the parameter [Pure] public static Vector2 Exp2(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Exp2)}({nameof(Vector2)})"); /// /// Returns the base-2 exponential of the specified value /// /// The specified value /// The base-2 exponential of the parameter [Pure] public static Vector3 Exp2(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Exp2)}({nameof(Vector3)})"); /// /// Returns the base-2 exponential of the specified value /// /// The specified value /// The base-2 exponential of the parameter [Pure] public static Vector4 Exp2(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Exp2)}({nameof(Vector4)})"); /// /// Returns the largest integer that is less than or equal to the specified value /// /// The specified value /// The largest integer value (returned as a floating-point type) that is less than or equal to the parameter [Pure] public static float Floor(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Floor)}(float)"); /// /// Returns the largest integer that is less than or equal to the specified value /// /// The specified value /// The largest integer value (returned as a floating-point type) that is less than or equal to the parameter [Pure] public static Vector2 Floor(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Floor)}({nameof(Vector2)})"); /// /// Returns the largest integer that is less than or equal to the specified value /// /// The specified value /// The largest integer value (returned as a floating-point type) that is less than or equal to the parameter [Pure] public static Vector3 Floor(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Floor)}({nameof(Vector3)})"); /// /// Returns the largest integer that is less than or equal to the specified value /// /// The specified value /// The largest integer value (returned as a floating-point type) that is less than or equal to the parameter [Pure] public static Vector4 Floor(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Floor)}({nameof(Vector4)})"); /// /// Returns the floating-point remainder of / /// /// The divident /// The divisor /// The floating-point remainder of the parameter divided by the parameter [Pure] public static float Fmod(float x, float y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Fmod)}(float)"); /// /// Returns the floating-point remainder of / /// /// The divident /// The divisor /// The floating-point remainder of the parameter divided by the parameter [Pure] public static Vector2 Fmod(Vector2 x, Vector2 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Fmod)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Returns the floating-point remainder of / /// /// The divident /// The divisor /// The floating-point remainder of the parameter divided by the parameter [Pure] public static Vector3 Fmod(Vector3 x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Fmod)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Returns the floating-point remainder of / /// /// The divident /// The divisor /// The floating-point remainder of the parameter divided by the parameter [Pure] public static Vector4 Fmod(Vector4 x, Vector4 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Fmod)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Returns the fractional (or decimal) part of , which is greater than or equal to 0 and less than 1 /// /// The specified value /// The fractional part of the parameter [Pure] public static float Frac(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Frac)}(float)"); /// /// Returns the fractional (or decimal) part of , which is greater than or equal to 0 and less than 1 /// /// The specified value /// The fractional part of the parameter [Pure] public static Vector2 Frac(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Frac)}({nameof(Vector2)})"); /// /// Returns the fractional (or decimal) part of , which is greater than or equal to 0 and less than 1 /// /// The specified value /// The fractional part of the parameter [Pure] public static Vector3 Frac(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Frac)}({nameof(Vector3)})"); /// /// Returns the fractional (or decimal) part of , which is greater than or equal to 0 and less than 1 /// /// The specified value /// The fractional part of the parameter [Pure] public static Vector4 Frac(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Frac)}({nameof(Vector4)})"); /// /// Returns the mantissa and exponent of the specified floating-point value /// /// The specified floating-point value (if the x parameter is 0, this function returns 0 for both the mantissa and the exponent) /// The returned exponent of the parameter /// The fractional part of the parameter [Pure] public static float Frexp(float x, out float exp) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Frexp)}(float,float)"); /// /// Returns the mantissa and exponent of the specified floating-point value /// /// The specified floating-point value (if the x parameter is 0, this function returns 0 for both the mantissa and the exponent) /// The returned exponent of the parameter /// The fractional part of the parameter [Pure] public static Vector2 Frexp(Vector2 x, out Vector2 exp) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Frexp)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Returns the mantissa and exponent of the specified floating-point value /// /// The specified floating-point value (if the x parameter is 0, this function returns 0 for both the mantissa and the exponent) /// The returned exponent of the parameter /// The fractional part of the parameter [Pure] public static Vector3 Frexp(Vector3 x, out Vector3 exp) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Frac)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Returns the mantissa and exponent of the specified floating-point value /// /// The specified floating-point value (if the x parameter is 0, this function returns 0 for both the mantissa and the exponent) /// The returned exponent of the parameter /// The fractional part of the parameter [Pure] public static Vector4 Frexp(Vector4 x, out Vector4 exp) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Frexp)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Determines if the specified floating-point value is finite /// /// The specified value /// Returns if the parameter is finite, otherwise [Pure] public static bool IsFinite(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(IsFinite)}(float)"); /// /// Determines if the specified floating-point value is infinite /// /// The specified value /// Returns if the parameter is infinite, otherwise [Pure] public static float IsInfinite(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(IsInfinite)}(float)"); /// /// Determines if the specified floating-point value is /// /// The specified value /// Returns if the parameter is , otherwise [Pure] public static float IsNaN(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(IsNaN)}(float)"); /// /// Returns the result of multiplying the specified value by two, raised to the power of the specified exponent /// /// The specified value /// The specified exponent /// The result of multiplying the parameter by two, raised to the power of the parameter [Pure] public static float Ldexp(float x, float exp) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ldexp)}(float)"); /// /// Returns the result of multiplying the specified value by two, raised to the power of the specified exponent /// /// The specified value /// The specified exponent /// The result of multiplying the parameter by two, raised to the power of the parameter [Pure] public static Vector2 Ldexp(Vector2 x, Vector2 exp) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ldexp)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Returns the result of multiplying the specified value by two, raised to the power of the specified exponent /// /// The specified value /// The specified exponent /// The result of multiplying the parameter by two, raised to the power of the parameter [Pure] public static Vector3 Ldexp(Vector3 x, Vector3 exp) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ldexp)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Returns the result of multiplying the specified value by two, raised to the power of the specified exponent /// /// The specified value /// The specified exponent /// The result of multiplying the parameter by two, raised to the power of the parameter [Pure] public static Vector4 Ldexp(Vector4 x, Vector4 exp) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ldexp)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Performs a linear interpolation /// /// The first value /// The second value /// A value that linearly interpolates between the parameter and the parameter /// The result of the linear interpolation [Pure] public static float Lerp(float x, float y, float s) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ldexp)}(float,float,float)"); /// /// Performs a linear interpolation /// /// The first value /// The second value /// A value that linearly interpolates between the parameter and the parameter /// The result of the linear interpolation [Pure] public static Vector2 Lerp(Vector2 x, Vector2 y, Vector2 s) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ldexp)}({nameof(Vector2)},{nameof(Vector2)},{nameof(Vector2)})"); /// /// Performs a linear interpolation /// /// The first value /// The second value /// A value that linearly interpolates between the parameter and the parameter /// The result of the linear interpolation [Pure] public static Vector3 Lerp(Vector3 x, Vector3 y, Vector3 s) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ldexp)}({nameof(Vector3)},{nameof(Vector3)},{nameof(Vector3)})"); /// /// Performs a linear interpolation /// /// The first value /// The second value /// A value that linearly interpolates between the parameter and the parameter /// The result of the linear interpolation [Pure] public static Vector2 Lerp(Vector4 x, Vector4 y, Vector4 s) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Ldexp)}({nameof(Vector4)},{nameof(Vector4)},{nameof(Vector4)})"); /// /// Returns the base-e logarithm of the specified value /// /// The specified value /// The base-e logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static float Log(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log)}(float)"); /// /// Returns the base-e logarithm of the specified value /// /// The specified value /// The base-e logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static Vector2 Log(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log)}({nameof(Vector2)})"); /// /// Returns the base-e logarithm of the specified value /// /// The specified value /// The base-e logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static Vector3 Log(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log)}({nameof(Vector3)})"); /// /// Returns the base-e logarithm of the specified value /// /// The specified value /// The base-e logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static Vector4 Log(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log)}({nameof(Vector4)})"); /// /// Returns the base-10 logarithm of the specified value /// /// The specified value /// The base-10 logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static float Log10(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log10)}(float)"); /// /// Returns the base-10 logarithm of the specified value /// /// The specified value /// The base-10 logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static Vector2 Log10(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log10)}({nameof(Vector2)})"); /// /// Returns the base-10 logarithm of the specified value /// /// The specified value /// The base-10 logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static Vector3 Log10(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log10)}({nameof(Vector3)})"); /// /// Returns the base-10 logarithm of the specified value /// /// The specified value /// The base-10 logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static Vector4 Log10(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log10)}({nameof(Vector4)})"); /// /// Returns the base-2 logarithm of the specified value /// /// The specified value /// The base-2 logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static float Log2(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log2)}(float)"); /// /// Returns the base-2 logarithm of the specified value /// /// The specified value /// The base-2 logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static Vector2 Log2(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log2)}({nameof(Vector2)})"); /// /// Returns the base-2 logarithm of the specified value /// /// The specified value /// The base-2 logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static Vector3 Log2(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log2)}({nameof(Vector3)})"); /// /// Returns the base-2 logarithm of the specified value /// /// The specified value /// The base-2 logarithm of the parameter (if parameter is negative this function returns indefinite, and if is 0, this function returns -INF) [Pure] public static Vector4 Log2(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Log2)}({nameof(Vector4)})"); /// /// Selects the greater of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the largest value /// For values of -INF or INF, will behave as expected [Pure] public static int Max(int x, int y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Max)}(int,int)"); /// /// Selects the greater of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the largest value /// For values of -INF or INF, will behave as expected, but for for values of , the results are undefined [Pure] public static float Max(float x, float y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Max)}(float,float)"); /// /// Selects the greater of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the largest value /// For values of -INF or INF, will behave as expected, but for for values of , the results are undefined [Pure] public static Vector2 Max(Vector2 x, Vector2 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Max)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Selects the greater of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the largest value /// For values of -INF or INF, will behave as expected, but for for values of , the results are undefined [Pure] public static Vector3 Max(Vector3 x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Max)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Selects the greater of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the largest value /// For values of -INF or INF, will behave as expected, but for for values of , the results are undefined [Pure] public static Vector4 Max(Vector4 x, Vector4 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Max)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Selects the lesser of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the smallest value /// For values of -INF or INF, will behave as expected [Pure] public static int Min(int x, int y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Min)}(int,int)"); /// /// Selects the lesser of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the smallest value /// For values of -INF or INF, will behave as expected, but for for values of , the results are undefined [Pure] public static float Min(float x, float y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Min)}(float,float)"); /// /// Selects the lesser of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the smallest value /// For values of -INF or INF, will behave as expected, but for for values of , the results are undefined [Pure] public static Vector2 Min(Vector2 x, Vector2 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Min)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Selects the lesser of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the smallest value /// For values of -INF or INF, will behave as expected, but for for values of , the results are undefined [Pure] public static Vector3 Min(Vector3 x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Min)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Selects the lesser of and /// /// The first specified value /// The second specified exponent /// The or parameter, whichever is the smallest value /// For values of -INF or INF, will behave as expected, but for for values of , the results are undefined [Pure] public static Vector4 Min(Vector4 x, Vector4 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Min)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Splits the value into fractional and integer parts, each of which has the same sign as /// /// The input value /// The integer portion of /// The signed-fractional portion of [Pure] public static int Modf(int x, int ip) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Modf)}(int,int)"); /// /// Splits the value into fractional and integer parts, each of which has the same sign as /// /// The input value /// The integer portion of /// The signed-fractional portion of [Pure] public static float Modf(float x, float ip) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Modf)}(float,float)"); /// /// Splits the value into fractional and integer parts, each of which has the same sign as /// /// The input value /// The integer portion of /// The signed-fractional portion of [Pure] public static Vector2 Modf(Vector2 x, Vector2 ip) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Modf)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Splits the value into fractional and integer parts, each of which has the same sign as /// /// The input value /// The integer portion of /// The signed-fractional portion of [Pure] public static Vector3 Modf(Vector3 x, Vector3 ip) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Modf)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Splits the value into fractional and integer parts, each of which has the same sign as /// /// The input value /// The integer portion of /// The signed-fractional portion of [Pure] public static Vector4 Modf(Vector4 x, Vector4 ip) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Modf)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Multiplies and using matrix math /// /// The first input value (if is a vector, it treated as a row vector) /// The second input value (if is a vector, it treated as a column vector) /// The result of times [Pure] public static Vector2 Mul(float x, Vector2 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Mul)}(float,{nameof(Vector2)})"); /// /// Multiplies and using matrix math /// /// The first input value (if is a vector, it treated as a row vector) /// The second input value (if is a vector, it treated as a column vector) /// The result of times [Pure] public static Vector3 Mul(float x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Mul)}(float,{nameof(Vector3)})"); /// /// Multiplies and using matrix math /// /// The first input value (if is a vector, it treated as a row vector) /// The second input value (if is a vector, it treated as a column vector) /// The result of times [Pure] public static Vector3 Mul(float x, Vector4 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Mul)}(float,{nameof(Vector4)})"); /// /// Multiplies and using matrix math /// /// The first input value (if is a vector, it treated as a row vector) /// The second input value (if is a vector, it treated as a column vector) /// The result of times [Pure] public static Vector2 Mul(Vector2 x, float y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Mul)}({nameof(Vector2)},float)"); /// /// Multiplies and using matrix math /// /// The first input value (if is a vector, it treated as a row vector) /// The second input value (if is a vector, it treated as a column vector) /// The result of times [Pure] public static Vector3 Mul(Vector3 x, float y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Mul)}({nameof(Vector3)},float)"); /// /// Multiplies and using matrix math /// /// The first input value (if is a vector, it treated as a row vector) /// The second input value (if is a vector, it treated as a column vector) /// The result of times [Pure] public static Vector4 Mul(Vector4 x, float y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Mul)}({nameof(Vector4)},float)"); /// /// Multiplies and using matrix math /// /// The first input value (if is a vector, it treated as a row vector) /// The second input value (if is a vector, it treated as a column vector) /// The result of times [Pure] public static float Mul(Vector2 x, Vector2 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Mul)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Multiplies and using matrix math /// /// The first input value (if is a vector, it treated as a row vector) /// The second input value (if is a vector, it treated as a column vector) /// The result of times [Pure] public static float Mul(Vector3 x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Mul)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Multiplies and using matrix math /// /// The first input value (if is a vector, it treated as a row vector) /// The second input value (if is a vector, it treated as a column vector) /// The result of times [Pure] public static float Mul(Vector4 x, Vector4 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Mul)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Normalizes the specified floating-point vector according to / length() /// /// The specified value /// The normalized parameter [Pure] public static Vector2 Normalize(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Normalize)}({nameof(Vector2)})"); /// /// Normalizes the specified floating-point vector according to / length() /// /// The specified value /// The normalized parameter [Pure] public static Vector3 Normalize(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Normalize)}({nameof(Vector3)})"); /// /// Normalizes the specified floating-point vector according to / length() /// /// The specified value /// The normalized parameter [Pure] public static Vector4 Normalize(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Normalize)}({nameof(Vector4)})"); /// /// Returns the specified value raised to the specified power /// /// The specified value /// The specified power /// The parameter raised to the power of the parameter /// See for details on special cases [Pure] public static float Pow(float x, float y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Pow)}(float,float)"); /// /// Returns the specified value raised to the specified power /// /// The specified value /// The specified power /// The parameter raised to the power of the parameter /// See for details on special cases [Pure] public static Vector2 Pow(Vector2 x, Vector2 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Pow)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Returns the specified value raised to the specified power /// /// The specified value /// The specified power /// The parameter raised to the power of the parameter /// See for details on special cases [Pure] public static Vector3 Pow(Vector3 x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Pow)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Returns the specified value raised to the specified power /// /// The specified value /// The specified power /// The parameter raised to the power of the parameter /// See for details on special cases [Pure] public static Vector4 Pow(Vector4 x, Vector4 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Pow)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Converts the specified value from degrees to radians /// /// The specified value /// The parameter converted from degrees to radians [Pure] public static float Radians(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Radians)}(float)"); /// /// Converts the specified value from degrees to radians /// /// The specified value /// The parameter converted from degrees to radians [Pure] public static Vector2 Radians(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Radians)}({nameof(Vector2)})"); /// /// Converts the specified value from degrees to radians /// /// The specified value /// The parameter converted from degrees to radians [Pure] public static Vector3 Radians(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Radians)}({nameof(Vector3)})"); /// /// Converts the specified value from degrees to radians /// /// The specified value /// The parameter converted from degrees to radians [Pure] public static Vector4 Radians(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Radians)}({nameof(Vector4)})"); /// /// Calculates a fast, approximate reciprocal of a given value /// /// The specified value /// The reciprocal of the parameter [Pure] public static float Rcp(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Rcp)}(float)"); /// /// Calculates a fast, approximate, per-component reciprocal /// /// The specified value /// The reciprocal of the parameter [Pure] public static Vector2 Rcp(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Rcp)}({nameof(Vector2)})"); /// /// Calculates a fast, approximate, per-component reciprocal /// /// The specified value /// The reciprocal of the parameter [Pure] public static Vector3 Rcp(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Rcp)}({nameof(Vector3)})"); /// /// Calculates a fast, approximate, per-component reciprocal /// /// The specified value /// The reciprocal of the parameter [Pure] public static Vector4 Rcp(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Rcp)}({nameof(Vector4)})"); /// /// Rounds the specified value to the nearest integer /// /// The specified value /// The parameter, rounded to the nearest integer within a floating-point type [Pure] public static float Round(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Round)}(float)"); /// /// Rounds the specified value to the nearest integer /// /// The specified value /// The parameter, rounded to the nearest integer within a floating-point type [Pure] public static Vector2 Round(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Round)}({nameof(Vector2)})"); /// /// Rounds the specified value to the nearest integer /// /// The specified value /// The parameter, rounded to the nearest integer within a floating-point type [Pure] public static Vector3 Round(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Round)}({nameof(Vector3)})"); /// /// Rounds the specified value to the nearest integer /// /// The specified value /// The parameter, rounded to the nearest integer within a floating-point type [Pure] public static Vector4 Round(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Round)}({nameof(Vector4)})"); /// /// Returns the reciprocal of the square root of the specified value /// /// The specified value /// The reciprocal of the square root of the parameter /// This function uses the following formula: 1 / sqrt() [Pure] public static float Rsqrt(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Rsqrt)}(float)"); /// /// Returns the reciprocal of the square root of the specified value /// /// The specified value /// The reciprocal of the square root of the parameter /// This function uses the following formula: 1 / sqrt() [Pure] public static Vector2 Rsqrt(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Rsqrt)}({nameof(Vector2)})"); /// /// Returns the reciprocal of the square root of the specified value /// /// The specified value /// The reciprocal of the square root of the parameter /// This function uses the following formula: 1 / sqrt() [Pure] public static Vector3 Rsqrt(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Rsqrt)}({nameof(Vector3)})"); /// /// Returns the reciprocal of the square root of the specified value /// /// The specified value /// The reciprocal of the square root of the parameter /// This function uses the following formula: 1 / sqrt() [Pure] public static Vector4 Rsqrt(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Rsqrt)}({nameof(Vector4)})"); /// /// Clamps the specified value within the range [0,1] /// /// The specified value /// The parameter, clamped within the range [0,1] [Pure] public static float Saturate(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Saturate)}(float)"); /// /// Clamps the specified value within the range [0,1] /// /// The specified value /// The parameter, clamped within the range [0,1] [Pure] public static Vector2 Saturate(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Saturate)}({nameof(Vector2)})"); /// /// Clamps the specified value within the range [0,1] /// /// The specified value /// The parameter, clamped within the range [0,1] [Pure] public static Vector3 Saturate(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Saturate)}({nameof(Vector3)})"); /// /// Clamps the specified value within the range [0,1] /// /// The specified value /// The parameter, clamped within the range [0,1] [Pure] public static Vector4 Saturate(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Saturate)}({nameof(Vector4)})"); /// /// Returns the sign of /// /// The input value /// Returns -1 if is less than zero, 0 if equals zero and 1 if is greater than zero [Pure] public static float Sign(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sign)}(float)"); /// /// Returns the sign of /// /// The input value /// Returns -1 if is less than zero, 0 if equals zero and 1 if is greater than zero [Pure] public static Vector2 Sign(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sign)}({nameof(Vector2)})"); /// /// Returns the sign of /// /// The input value /// Returns -1 if is less than zero, 0 if equals zero and 1 if is greater than zero [Pure] public static Vector3 Sign(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sign)}({nameof(Vector3)})"); /// /// Returns the sign of /// /// The input value /// Returns -1 if is less than zero, 0 if equals zero and 1 if is greater than zero [Pure] public static Vector4 Sign(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sign)}({nameof(Vector4)})"); /// /// Returns the sine of the specified value /// /// The specified value, in radians /// The sine of the parameter [Pure] public static float Sin(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sin)}(float)"); /// /// Returns the sine of the specified value /// /// The specified value, in radians /// The sine of the parameter [Pure] public static Vector2 Sin(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sin)}({nameof(Vector2)})"); /// /// Returns the sine of the specified value /// /// The specified value, in radians /// The sine of the parameter [Pure] public static Vector3 Sin(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sin)}({nameof(Vector3)})"); /// /// Returns the sine of the specified value /// /// The specified value, in radians /// The sine of the parameter [Pure] public static Vector4 Sin(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sin)}({nameof(Vector4)})"); /// /// Returns the sine and cosine of /// /// The specified value, in radians /// Returns the sine of /// Returns the cosine of public static void SinCos(float x, out float s, out float c) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(SinCos)}(float,float,float)"); /// /// Returns the sine and cosine of /// /// The specified value, in radians /// Returns the sine of /// Returns the cosine of public static void SinCos(Vector2 x, out Vector2 s, out Vector2 c) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(SinCos)}({nameof(Vector2)},{nameof(Vector2)},{nameof(Vector2)})"); /// /// Returns the sine and cosine of /// /// The specified value, in radians /// Returns the sine of /// Returns the cosine of public static void SinCos(Vector3 x, out Vector3 s, out Vector3 c) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(SinCos)}({nameof(Vector3)},{nameof(Vector3)},{nameof(Vector3)})"); /// /// Returns the sine and cosine of /// /// The specified value, in radians /// Returns the sine of /// Returns the cosine of public static void SinCos(Vector4 x, out Vector4 s, out Vector4 c) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(SinCos)}({nameof(Vector4)},{nameof(Vector4)},{nameof(Vector4)})"); /// /// Returns the hyperbolic sine of the specified value /// /// The specified value, in radians /// The hyperbolic sine of the parameter [Pure] public static float Sinh(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sinh)}(float)"); /// /// Returns the hyperbolic sine of the specified value /// /// The specified value, in radians /// The hyperbolic sine of the parameter [Pure] public static Vector2 Sinh(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sinh)}({nameof(Vector2)})"); /// /// Returns the hyperbolic sine of the specified value /// /// The specified value, in radians /// The hyperbolic sine of the parameter [Pure] public static Vector3 Sinh(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sinh)}({nameof(Vector3)})"); /// /// Returns the hyperbolic sine of the specified value /// /// The specified value, in radians /// The hyperbolic sine of the parameter [Pure] public static Vector4 Sinh(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sinh)}({nameof(Vector4)})"); /// /// Returns a smooth Hermite interpolation between 0 and 1, if is in the range [, ] /// /// The minimum range of the parameter /// The maximum range of the parameter /// The specified value to be interpolated /// 0 if is less than , 1 if is greater than , otherwise a value between 0 and 1 if is in the range [, ] [Pure] public static float SmoothStep(float min, float max, float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(SmoothStep)}(float,float,float)"); /// /// Returns a smooth Hermite interpolation between 0 and 1, if is in the range [, ] /// /// The minimum range of the parameter /// The maximum range of the parameter /// The specified value to be interpolated /// 0 if is less than , 1 if is greater than , otherwise a value between 0 and 1 if is in the range [, ] [Pure] public static Vector2 SmoothStep(Vector2 min, Vector2 max, Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(SmoothStep)}({nameof(Vector2)},{nameof(Vector2)},{nameof(Vector2)})"); /// /// Returns a smooth Hermite interpolation between 0 and 1, if is in the range [, ] /// /// The minimum range of the parameter /// The maximum range of the parameter /// The specified value to be interpolated /// 0 if is less than , 1 if is greater than , otherwise a value between 0 and 1 if is in the range [, ] [Pure] public static Vector3 SmoothStep(Vector3 min, Vector3 max, Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(SmoothStep)}({nameof(Vector3)},{nameof(Vector3)},{nameof(Vector3)})"); /// /// Returns a smooth Hermite interpolation between 0 and 1, if is in the range [, ] /// /// The minimum range of the parameter /// The maximum range of the parameter /// The specified value to be interpolated /// 0 if is less than , 1 if is greater than , otherwise a value between 0 and 1 if is in the range [, ] [Pure] public static Vector4 SmoothStep(Vector4 min, Vector4 max, Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(SmoothStep)}({nameof(Vector4)},{nameof(Vector4)},{nameof(Vector4)})"); /// /// Returns the square root of the specified floating-point value /// /// The specified value /// The square root of the parameter [Pure] public static float Sqrt(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sqrt)}(float)"); /// /// Returns the square root of the specified floating-point value, per component /// /// The specified value /// The square root of the parameter, per component [Pure] public static Vector2 Sqrt(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sqrt)}({nameof(Vector2)})"); /// /// Returns the square root of the specified floating-point value, per component /// /// The specified value /// The square root of the parameter, per component [Pure] public static Vector3 Sqrt(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sqrt)}({nameof(Vector3)})"); /// /// Returns the square root of the specified floating-point value, per component /// /// The specified value /// The square root of the parameter, per component [Pure] public static Vector4 Sqrt(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Sqrt)}({nameof(Vector4)})"); /// /// Compares two values, returning 0 or 1 based on which value is greater /// /// The first specified value to compare /// The second specified value to compare /// 1 if the parameter is greater than or equal to the parameter, otherwise, 0 /// This function uses the following formula: (x >= y) ? 1 : 0 [Pure] public static float Step(float x, float y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Step)}(float,float)"); /// /// Compares two values, returning 0 or 1 based on which value is greater /// /// The first specified value to compare /// The second specified value to compare /// 1 if the parameter is greater than or equal to the parameter, otherwise, 0 /// This function uses the following formula: (x >= y) ? 1 : 0 [Pure] public static Vector2 Step(Vector2 x, Vector2 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Step)}({nameof(Vector2)},{nameof(Vector2)})"); /// /// Compares two values, returning 0 or 1 based on which value is greater /// /// The first specified value to compare /// The second specified value to compare /// 1 if the parameter is greater than or equal to the parameter, otherwise, 0 /// This function uses the following formula: (x >= y) ? 1 : 0 [Pure] public static Vector3 Step(Vector3 x, Vector3 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Step)}({nameof(Vector3)},{nameof(Vector3)})"); /// /// Compares two values, returning 0 or 1 based on which value is greater /// /// The first specified value to compare /// The second specified value to compare /// 1 if the parameter is greater than or equal to the parameter, otherwise, 0 /// This function uses the following formula: (x >= y) ? 1 : 0 [Pure] public static Vector4 Step(Vector4 x, Vector4 y) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Step)}({nameof(Vector4)},{nameof(Vector4)})"); /// /// Returns the tangent of the specified value /// /// The specified value, in radians /// The tangent of the parameter [Pure] public static float Tan(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Tan)}(float)"); /// /// Returns the tangent of the specified value /// /// The specified value, in radians /// The tangent of the parameter [Pure] public static Vector2 Tan(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Tan)}({nameof(Vector2)})"); /// /// Returns the tangent of the specified value /// /// The specified value, in radians /// The tangent of the parameter [Pure] public static Vector3 Tan(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Tan)}({nameof(Vector3)})"); /// /// Returns the tangent of the specified value /// /// The specified value, in radians /// The tangent of the parameter [Pure] public static Vector4 Tan(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Tan)}({nameof(Vector4)})"); /// /// Returns the hyperbolic tangent of the specified value /// /// The specified value, in radians /// The hyperbolic tangent of the parameter [Pure] public static float Tanh(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Tanh)}(float)"); /// /// Returns the hyperbolic tangent of the specified value /// /// The specified value, in radians /// The hyperbolic tangent of the parameter [Pure] public static Vector2 Tanh(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Tanh)}({nameof(Vector2)})"); /// /// Returns the hyperbolic tangent of the specified value /// /// The specified value, in radians /// The hyperbolic tangent of the parameter [Pure] public static Vector3 Tanh(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Tanh)}({nameof(Vector3)})"); /// /// Returns the hyperbolic tangent of the specified value /// /// The specified value, in radians /// The hyperbolic tangent of the parameter [Pure] public static Vector4 Tanh(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Tanh)}({nameof(Vector4)})"); /// /// Truncates a floating-point value to the integer component /// /// The specified value, in radians /// The parameter truncated to an integer component [Pure] public static float Trunc(float x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Trunc)}(float)"); /// /// Truncates a floating-point value to the integer component /// /// The specified value, in radians /// The parameter truncated to an integer component [Pure] public static Vector2 Trunc(Vector2 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Trunc)}({nameof(Vector2)})"); /// /// Truncates a floating-point value to the integer component /// /// The specified value, in radians /// The parameter truncated to an integer component [Pure] public static Vector3 Trunc(Vector3 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Trunc)}({nameof(Vector3)})"); /// /// Truncates a floating-point value to the integer component /// /// The specified value, in radians /// The parameter truncated to an integer component [Pure] public static Vector4 Trunc(Vector4 x) => throw new InvalidExecutionContextException($"{nameof(Hlsl)}.{nameof(Trunc)}({nameof(Vector4)})"); } }