Math.pow
Math 멤버
Returns x raised to the power of y; x ** y is the same operation.
시그니처와 이름 아래 문장, 컴파일러 메시지는 커밋 af54ddad5의 컴파일러가 쓴 영어 원문입니다.
구문
Math.pow(base: number, exponent: number): number매개변수나 반환 위치에 쓰인 number는 스칼라가 들어갈 자리입니다. 앰비언트 파일은 GPU 스칼라를 브랜드가 붙은 number로 선언하고 그 브랜드는 선택이라서, 리터럴도 브랜드가 붙은 스칼라도 이 자리에 들어갑니다.
type f32 = number & { readonly [f32Tag]?: true }
타입으로 쓴 number는 쓰이는 곳을 보고 추론하며, f32, i32, u32는 너비를 고정합니다. 그 행과 컴파일러가 낸 결과는 TypeScript에서 페이지에 있습니다.
매개변수
-
basenumber -
exponentnumber
반환값
number
설명
The GPU result is undefined when x is negative, when x is 1 and y is infinite, and when x is infinite and y is 0, and on GLSL ES 3.00 also when x is 0 and y is 0 or less. The CPU oracle gives JavaScript's special values (Math.pow(-2., 3.) is -8 and Math.pow(-2., 0.5) is NaN); a finite result is the compiler's own libm's, the same on every engine, and may differ from an engine's Math.pow in the last bit.