atan
이 페이지에서

atan()

함수, 내장 함수 분류

atan(x): single-argument arctangent, returning radians in (-π/2, π/2), component-wise.

import { atan } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

const atan: <K extends FloatKey>(x: ReadonlyNode<K>) => Node<K>

매개변수

x ReadonlyNode<K>

반환값

Node<K>

설명

atan(x): single-argument arctangent, returning radians in (-π/2, π/2), component-wise. It covers two quadrants only; use atan2 for the two-argument form, which recovers the full angle from a (y, x) pair with the sign information a plain ratio drops.

예제

예제

import { fn, atan, exp, f32T } from 'typeshade'
// The Gudermannian function, 2·atan(exp(y)) − π/2, is built on atan(exp(y)).
const gudermannian = fn('gud', { y: f32T }, ({ y }) => atan(exp(y)))

대상별 지원

대상지원비고
WGSL (WebGPU) 지원

atan(x).

GLSL ES 3.00 (WebGL2) 지원

atan(x).

CPU 오라클 지원

Evaluated in f64 by the oracle.

함께 보기

소스

src/core/ir/node.ts, 1392행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고