← 수업 제작 도구
홈 › Components › Sketch (그림판) › 화면 27

화면 27. Sketch.function [sink]

원본: Computation Layer 문서(Sketch (그림판)) · Try It (원본 화면)

화면 번호27 / 34
문서 항목 설명 (원문)functionidentifier: latex Sets the output of simpleFunction() to a variable defined in the graph.

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 27 캡처

화면에 적힌 영어 문구(원문):

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 그림판그림판
# Get the latex string from "equationInput" and assign
# it to f in the calculator.
▷ "equationInput"에서 latex 글자를 가져와 계산기의 f에 정한다.

function("f"): simpleFunction(equationInput.latex, "x")
▶ 그래프 배경의 함수 f(function("f"))는 simpleFunction(equationInput.latex, "x"), 즉 equationInput에 입력된 식의 latex 글자를 x에 관한 함수로 만든 것으로 한다.
function("f")는 simpleFunction()의 결과를 그래프에 정의된 변수에 정한다. simpleFunction은 latex 글자를 받아 함수를 돌려주며, 첫 인자는 latex 글자, 나머지 인자는 입력 변수 이름이다.