sqrt
2024-05-03 10:23:16

float sqrt3(const float& n)                                                                       

{                                                                                                 

    //https://www.gamedev.net/forums/topic/704525-3-quick-ways-to-calculate-the-square-root-in-c/ 

    if (n == 0)                                                                                   

        return 0.0f;                                                                              

    static union { int i; float f; } u;                                                           

    u.i = 0x2035AD0C + (*(int*)&n >> 1);                                                          

    return n / u.f + u.f * 0.25f;                                                                 

}                                                                                                 

▼ more
The 21st century is here
2024-05-03 10:23:01

ChatGPT

ChatGPT

▼ more
Goodbye my old friend
2023-12-13 20:18:02

▼ more
wsl ssh
2023-11-21 22:03:52

WSL

set up ssh server and change its port number using /etc/ssh/sshd_config

then open the firewall

sudo ufw allow $PORT/tcp

WSL uses its own IP address thus you need to check the ip then set port forwarding using the command below.

Powershell

netsh interface portproxy add v4tov4 listenport=PORT listenaddress='0.0.0.0' connectport=PORT connectaddress=WSL_IP

▼ more