Skip to content

Instantly share code, notes, and snippets.

overwatch is 16MF9 while source is 4ML3, search these terms in this discord for some definitions for them. let us arbitrarily set your screen resolution to w x h for width/height.

note. i call fortnite 80hML in the examples below; this is not exactly true, fortnite is 16MI9, see this document for more information about FILM notation

intro

the key idea here is to match focal length between games (or more precisely FoVs), which is the normal distance from the camera (you) to the canvas upon which the game is drawn. matching this length causes objects moving at the same velocities in both FoVs to have the same motion on your screen, which is arguably the most important part of aiming.

how do we calculate focal length? if we know how our game scales its implicit image, and its nominal FoV, then we can compute the focal length with some geometry/trig. you are one question or google search away from figuring out your n

1
00:00:01,013 --> 00:00:04,800
<b><font color="#0080C0">(ALARM RINGING)</font></b>
2
00:00:04,825 --> 00:00:06,858
<b><font color="#0080C0">(ALARM STOPS)</font></b>
3
00:00:13,014 --> 00:00:14,776
@codyhan94
codyhan94 / windows standard.sty
Created January 10, 2015 23:56
windows standard.sty
\ProvidesPackage{standard}
% Minion configuration
% \usepackage[mathlf, minionint]{MinionPro}
% Concrete Math configuration
% \usepackage[amssymb]{concmath}
% Times configuration
% \usepackage{times}
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@codyhan94
codyhan94 / gist:7b9f00691c855520f51d
Created November 8, 2014 20:42
PQ comparable fix
from queue import PriorityQueue
import config
class EventQueue:
def __init__(self):
self.q = PriorityQueue()
def get(self):
if self.q.empty():
return -1
ages = {40, 34, 23, 40, 31, 33, 49, 33, 34, 43, 26, 39};
dates = {1543, 1600, 1665, 1746, 1774, 1839, 1858, 1864, 1896, 1901,
1905, 1926};
data = Transpose[{dates, ages}];
model = LinearModelFit[data, t, t]
residuals = model["FitResiduals"]
KolmogorovSmirnovTest[residuals]
KolmogorovSmirnovTest[residuals, NormalDistribution[],
"HypothesisTestData"]["TestDataTable"]
a=read.table("Anscombe3", header=TRUE)
model=lm(formula=y~x, data=a)
e=residuals(model)
ks.test(e, pnorm)
ans3 = Import["Anscombe3", "Table", "HeaderLines" -> 1];
ansModel = LinearModelFit[ans3, x, x];
residuals = ansModel["FitResiduals"]
KolmogorovSmirnovTest[residuals]
KolmogorovSmirnovTest[residuals, NormalDistribution[]]
int f(const vector<int> &x)
{
int longest = 2;
int p = 0;
int q = 0;
while (q < x.size())
{
int len = q - p + 1;
if (admissible(x, p, q))
{
int array[];
int prev2 = array[0];
int prev1 = array[1];
int sum_prev = prev1 + prev2;
bool seg_good = true;
for (int i = 2; i < n; ++i)
{
int cur = array[i];
if (cur == sum_prev)