Math 멤버

Math 멤버

이름 36개

셰이더에서 손댈 수 있는 Math 멤버이며, 내장 함수나 리터럴로 이어집니다.

이름마다 붙은 시그니처와 설명은 커밋 26de7be8의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

Math.fround
Casts a number to f32 single-precision floating-point by inlining a literal value rounded to 32-bit precision.
Math.random
Not a GPU builtin: a call with no seed does not compile, because a shader has no random source.
Math.abs
Returns the absolute value of x, componentwise over vectors.
Math.acos
Returns the arccosine of x (in radians), componentwise over vectors.
Math.acosh
Returns the inverse hyperbolic cosine of x, componentwise over vectors.
Math.asin
Returns the arcsine of x (in radians), componentwise over vectors.
Math.asinh
Returns the inverse hyperbolic sine of x, componentwise over vectors.
Math.atan
Returns the arctangent of x (in radians), componentwise over vectors.
Math.atanh
Returns the inverse hyperbolic tangent of x, componentwise over vectors.
Math.atan2
Returns the arctangent of y/x (in radians), using the signs of both arguments to determine the quadrant, taking arguments in the order (y, x).
Math.ceil
Returns the smallest integer not less than x, componentwise over vectors.
Math.cos
Returns the cosine of x (in radians), componentwise over vectors.
Math.cosh
Returns the hyperbolic cosine of x, componentwise over vectors.
Math.exp
Returns the exponential function (e raised to the power of x), componentwise over vectors.
Math.floor
Returns the largest integer not greater than x, componentwise over vectors.
Math.log
Returns the natural logarithm of x, componentwise over vectors.
Math.log2
Returns the base-2 logarithm of x, componentwise over vectors.
Math.max
Returns the greater of a and b, componentwise over vectors.
Math.min
Returns the lesser of a and b, componentwise over vectors.
Math.pow
Returns x raised to the power of y, componentwise over vectors.
Math.round
Rounds x to the nearest integer, with halfway cases rounding to the nearest even integer, componentwise over vectors.
Math.sign
Returns -1 if x is negative, 1 if positive, and 0 if zero, componentwise over vectors.
Math.sin
Returns the sine of x (in radians), componentwise over vectors.
Math.sinh
Returns the hyperbolic sine of x, componentwise over vectors.
Math.sqrt
Returns the square root of x, componentwise over vectors.
Math.tan
Returns the tangent of x (in radians), componentwise over vectors.
Math.tanh
Returns the hyperbolic tangent of x, componentwise over vectors.
Math.trunc
Returns x truncated toward zero, componentwise over vectors.
Math.E
The mathematical constant e, inlined as a compile-time f32 literal (approximately 2.71828).
Math.LN10
The natural logarithm of 10, inlined as a compile-time f32 literal (approximately 2.30259).
Math.LN2
The natural logarithm of 2, inlined as a compile-time f32 literal (approximately 0.69315).
Math.LOG10E
The base-10 logarithm of e, inlined as a compile-time f32 literal (approximately 0.43429).
Math.LOG2E
The base-2 logarithm of e, inlined as a compile-time f32 literal (approximately 1.44270).
Math.PI
The mathematical constant π, inlined as a compile-time f32 literal (approximately 3.14159).
Math.SQRT1_2
The square root of 1/2, inlined as a compile-time f32 literal (approximately 0.70711).
Math.SQRT2
The square root of 2, inlined as a compile-time f32 literal (approximately 1.41421).

이 페이지의 항목은 모두 고정된 커밋의 컴파일러에서 읽어 왔고, 여기서 직접 입력한 것은 없습니다.

이 페이지 편집 문제 보고