[PAC]새벽에 갑자기 생각난것

Version: v20240927-002

logo

    검색 결과가 없습니다.

전체 글 보기
선택
미리보기
제목
작성자
날짜
조회
댓글
가격
번호
thumbnail
0icon[자유]헤번레 루카 닮은꼴
iconicon
user-profile-imageKEY텍스358activity-badge
5분 전
12
0icon
자유
0icon[자유]테어강 테어강 "주워" 선행하러 갑시다
iconicon
user-profile-image파르제팔눈낭activity-badge
13분 전
39
0icon
자유
0icon[자유]그거 아시나요? 전 아직도 점심을 먹지 않았습니다
[11]icon
user-profile-image고죠 쌌도루activity-badge
24분 전
75
11
0icon
자유
thumbnail
0icon[자유]롤더체스는 도대체 뭐였던거임?
iconicon
user-profile-image시능activity-badge
27분 전
73
0icon
자유
thumbnail
0icon[자유]오 좀 꼴
[4]iconicon
user-profile-image시능activity-badge
31분 전
105
4
0icon
자유
thumbnail
0icon수정) 09.29 방송후기(붕괴 스타레일, 쉘터탐방)
iconicon
user-profile-image달을삼킨커비user-badgeactivity-badge
34분 전
9
0icon
잡담게시판
thumbnail
0icon[자유]?
[5]iconicon
user-profile-image운외창천activity-badge
42분 전
125
5
0icon
자유
0icon[잡담]놀랍게도
[7]icon
user-profile-image가화owner-badgeactivity-badge
48분 전
16
7
0icon
✨노닥노닥 생활관✨
thumbnail
0icon[자유]종맨 유통기한 떡밥 방송 언제부터쯤임?
iconicon
user-profile-image갱생하는메악귀activity-badge
54분 전
127
0icon
자유
0icon[잡담]가짱 속은 괜찮??
icon
user-profile-image죠스바39user-badgeactivity-badge
1시간 전
5
0icon
✨노닥노닥 생활관✨
0icon[자유]쉘터버그 개쩌네
icon
user-profile-image시능activity-badge
1시간 전
99
0icon
자유
thumbnail
0icon[자유]마왕들보고가삼
[3]iconicon
user-profile-image시능activity-badge
1시간 전
147
3
0icon
후방주의
thumbnail
0icon[자유]비공식 굿즈가 공식굿즈가 된것에 대하여
[1]iconicon
user-profile-image유루쿠user-badgeactivity-badge
1시간 전
124
1
0icon
자유
thumbnail
0icon[자유]말딸 밴드 펄, 마야 고유기, 1착 모션
[1]iconicon
user-profile-imageSBactivity-badge
1시간 전
61
1
0icon
자유
thumbnail
0icon[자유]펌) 님들 죄송한데 진짜 좆될것 같아서 한 번만 더 올릴게요
[14]iconicon
user-profile-image운외창천activity-badge
1시간 전
237
14
0icon
자유
thumbnail
0icon근데 내일 정확히 뭐하러
[2]iconicon
user-profile-image양하림activity-badge
1시간 전
4
2
0icon
개소리
thumbnail
0icon[소식]캣판타지 신규 캐릭터 및 이벤트 업데이트 (10/3)
iconicon
user-profile-image심플칼리스토activity-badge
1시간 전
118
0icon
소식
thumbnail
0icon[유머]미술작품:진주 귀고리를 한
iconicon
user-profile-imagekurunuactivity-badge
1시간 전
5
0icon
유머 게시판🤣
thumbnail
0icon[유머]으헤이아치
[1]iconicon
user-profile-imagekurunuactivity-badge
1시간 전
7
1
0icon
유머 게시판🤣
thumbnail
0icon[유머]듀얼에 미친 아이
iconicon
user-profile-imagekurunuactivity-badge
1시간 전
10
0icon
유머 게시판🤣
리더보드
  • 종합
  • 월 후원액
  • 팬 활동
  • 활성 팬
  • 순위닉네임종합
  • rank-1
    user-profile-image해봄
    21K pt
  • rank-2
    arrow-up
    user-profile-image고갈왕
    9787 pt
  • rank-3
    arrow-down
    user-profile-image룬레이
    9760 pt
  • 4
    user-profile-image으앙두
    9004 pt
  • 5
    user-profile-image가화
    5264 pt
  • 6
    user-profile-image팬텀크로
    2134 pt
  • 7
    user-profile-image임하루야나
    1579 pt
  • 8
    user-profile-image바나
    1504 pt
  • 9
    user-profile-image연비니
    1136 pt
  • 10
    user-profile-image글라세
    829 pt
가이코의 빅시티> 잡담 게시판

[잡담][PAC]새벽에 갑자기 생각난것

  • 72 조회
무난
activity-badgeactivity-level-badge
user-profile-image

보통 가만히 있다가, n초 뒤에 a만큼 움직이고, 멈추게 하려면 hide 프록시를 사용합니다.

하지만 hide 프록시는 같은 프롭을 여러개 사용해야하는 불편함이 있습니다.

그래서 오늘은 clamp를 사용해볼것입니다.


프록시의 수식 특성상 if, 조건문을 사용할 수 없습니다.

그러나 함수 자체가 조건문이라면 이용해볼수 있죠.


수식을 한번 적어보겠습니다. (편의상 초당 1씩 움직이는거로 하겠습니다.)

n -> 작동하기까지 대기시간
a -> 시작 위치
b -> 끝나는 위치

clamp(a - n + timeex(), a, b)


clamp(x, min, max) 함수는,
x의 값을 min과 max 사이에서만 존재하게 합니다.
x가 min보다 작으면 min, x가 max보다 커지면 max를 반환해주죠.
함수 자체가 조건문을 사용하고 있습니다.


단순히 수의 흐름을 적어보자면 (a = 1, n = 2, b =3이라 가정, t 는 시간)

t = 0 일때, clamp(a - n + timeex(), a, b) = 1 (a - n + t 는 1보다 작기 때문에 1을 반환.)
t = 1 일때, clamp(a - n + timeex(), a, b) = 1
t = 2 일때, clamp(a - n + timeex(), a, b) = 1 (여기부터 움직이기 시작)
t = 3 일때, clamp(a - n + timeex(), a, b) = 2
t = 4 일때, clamp(a - n + timeex(), a, b) = 3
t = 5 일때, clamp(a - n + timeex(), a, b) = 3 (max 값이 b이기때문에 3보다 올라가지 않음.)

그래프로 알려드리면 편하나 그래프 그리는 프로그램 받기 귀찮네요.

어쨋든 이런식으로 하이드 프록시를 최소화하며 n 시간 뒤에 a부터 시작해 b 까지 가는 함수를 만들어보았습니다.
어찌보면 가장 기본적인 함수인데 살면서 한번도 pac에 사용해본적이 없네요.


그럼 다른거 생각나거나 요청이 있을시 가이드를 적어보도록 하겠습니다.

댓글 (0)

등록된 댓글이 없습니다.