This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handleHover(e: MouseEvent) { | |
const { clientX, clientY, currentTarget } = e; | |
const { clientWidth, clientHeight, offsetLeft, offsetTop } = currentTarget as HTMLDivElement; | |
if (currentTarget instanceof HTMLDivElement) { | |
const horizontal = (clientX - offsetLeft) / clientWidth; | |
const vertical = (clientY + scrollY - offsetTop) / clientHeight; | |
const rotateX = (THRESHOLD / 2 - horizontal * THRESHOLD).toFixed(2); | |
const rotateY = (vertical * THRESHOLD - THRESHOLD / 2).toFixed(2); | |
currentTarget.style.transform = `perspective(${clientWidth}px) rotateX(${rotateY}deg) rotateY(${rotateX}deg) scale3d(1.2, 1.2, 1.2)`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FILE * low; | |
// FILE * high; | |
// FILE * deriv; | |
// FILE * square; | |
// FILE * mwi; | |
// | |
// low = fopen ("../outputData/output_low.txt","w"); | |
// high = fopen ("../outputData/out_high.txt","w"); | |
// deriv = fopen ("../outputData/out_deriv.txt","w"); | |
// square = fopen ("../outputData/out_square.txt","w"); |