---
title: "GradCheckResult: TypeShade 셰이더 API의 IR 분류 인터페이스 참조 문서"
description: "GradCheckResult, TypeShade API의 IR 분류에 속하는 인터페이스입니다. gradCheck가 반환하는 값입니다."
url: https://typeshade.dev/ko/api/gradcheckresult/
language: ko
---

# `GradCheckResult`

인터페이스, IR 분류

gradCheck가 반환하는 값입니다.

`import type { GradCheckResult } from 'typeshade'`

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

```ts
interface GradCheckResult {
  readonly ok: boolean;
  readonly checked: number;
  readonly worst?: { /** The parameter. */ readonly param: string; /** The index of the point in {@link GradCheckOptions.at}. */ readonly point: number; /** The component of the parameter, `0` for a scalar. */ readonly component: number; /** The component of the result, `0` for a scalar. */ readonly output: number; /** The partial derivative the derivative function gives. */ readonly derivative: number; /** The central difference. */ readonly difference: number; };
}
```

## 인스턴스 속성

**`ok` 읽기 전용 `boolean`**

모든 편미분이 허용 오차 이내일 때 `true`입니다.

**`checked` 읽기 전용 `number`**

비교한 편미분의 개수입니다.

**`worst` 선택 사항 읽기 전용 ``{ /** The parameter. */ readonly param: string; /** The index of the point in {@link GradCheckOptions.at}. */ readonly point: number; /** The component of the parameter, `0` for a scalar. */ readonly component: number; /** The component of the result, `0` for a scalar. */ readonly output: number; /** The partial derivative the derivative function gives. */ readonly derivative: number; /** The central difference. */ readonly difference: number; }``**

허용 오차를 기준으로 가장 멀리 벗어난 편미분입니다. 도함수와 중심 차분이 갈라지는 위치도 담깁니다. `ok`이면 이 값은 없습니다.

## 함께 보기

- [`gradCheck`](https://typeshade.dev/ko/api/gradcheck/)

## 소스

[`src/core/passes/grad-check.ts`, 36행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/passes/grad-check.ts#L36), 커밋 af54ddad5 기준
