• Skip to primary navigation
  • Skip to content
  • Skip to footer
Welcome to the development world of chp Welcome to the development world of chp
  • categories
  • tags
    1. 홈
    2. /
    3. Programming language
    4. /
    5. Cpp
    6. /
    7. Grammar
    8. /
    9. 20
    10. /
    11. C++: lerp
    chp

    chp

    99점이 100점이 되기 위해 일을 더하는 개발자

    • South Korea
    • Website
    • GitHub

    C++: lerp

    최대 1 분 소요

    목차

    • 개요
    • 예제

    개요

    • a와 b 사이의 선형 보간(a+t(b-a))을 계산


    예제

    • 코드
        #include <cmath>
        #include <iostream>
    
        using namespace std;
    
        int main() {
        	cout << lerp(1, 2, 0) << endl;
        	cout << lerp(1, 2, 1) << endl;
        	cout << lerp(1, 2, 0.5) << endl;
    
        	return 0;
        }
    
    • 실행 결과
        1
        2
        1.5
    

    태그: C++, C++20, lerp

    카테고리: 20, cpp, grammar, programming-language

    업데이트: November 22, 2022

    공유하기

    X Facebook LinkedIn Bluesky
    이전 다음

    참고

    React: 실무 패턴

    3 분 소요

    개요

    React: 테스트 (Vitest, Testing Library)

    2 분 소요

    개요

    React: shadcn/ui

    1 분 소요

    개요

    React: Tailwind CSS

    1 분 소요

    개요

    • 팔로우:
    • GitHub
    © 2026 Welcome to the development world of chp. 제작 지원: Jekyll & Minimal Mistakes.