Skip to content

Instantly share code, notes, and snippets.

@Joshua-Ashton
Last active February 1, 2023 07:20
Show Gist options
  • Save Joshua-Ashton/b56de8d27d33a5935d8e769d5afc114a to your computer and use it in GitHub Desktop.
Save Joshua-Ashton/b56de8d27d33a5935d8e769d5afc114a to your computer and use it in GitHub Desktop.
double not_terrible_lerp<double>(double, double, double):
push rbp
mov rbp, rsp
movsd QWORD PTR [rbp-8], xmm0
movsd QWORD PTR [rbp-16], xmm1
movsd QWORD PTR [rbp-24], xmm2
movsd xmm0, QWORD PTR [rbp-16]
subsd xmm0, QWORD PTR [rbp-8]
mulsd xmm0, QWORD PTR [rbp-24]
addsd xmm0, QWORD PTR [rbp-8]
pop rbp
ret
@naikrovek
Copy link

this illustrates it very clearly. thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment