Skip to content

Instantly share code, notes, and snippets.

'use strict';
switch(inputs.mode) {
case "zoom" :
return {
zoomSens: 100 * Math.tan(51*Math.PI/360) / Math.tan(103*Math.PI/360)
};
case "custom" :
return {
zoomSens: 100 * Math.atan(inputs.coef*Math.tan(51*Math.PI/360)) / Math.atan(inputs.coef*Math.tan(103*Math.PI/360))
};
@Skwuruhl
Skwuruhl / mod.txt
Created January 8, 2018 22:15
Payday 2 set FOV and Sensitivity
{
"name" : "set FOV & Sensitivity",
"keybinds": [
{
"keybind_id": "set_fov_sens",
"name": "set FOV & Sensitivity",
"script_path": "set.lua",
"run_in_menu": true,
"run_in_game": true,
"localized": false
@Skwuruhl
Skwuruhl / NormalizedSens.lua
Created January 8, 2018 22:13
Payday 2 ADS
function MenuManager:set_mouse_sensitivity(zoomed)
local zoom_sense = zoomed
local sense_x, sense_y
if zoom_sense then
sense_x = managers.user:get_setting("camera_zoom_sensitivity_x")
sense_y = managers.user:get_setting("camera_zoom_sensitivity_y")
else
sense_x = managers.user:get_setting("camera_sensitivity_x")
sense_y = managers.user:get_setting("camera_sensitivity_y")
end
@Skwuruhl
Skwuruhl / Normalization.java
Created January 8, 2018 22:12
Killing Floor 2 ADS Normalization (Java)
package kf2ads;
import java.math.RoundingMode;
import java.text.DecimalFormat;
public class Normalization {
double rfov, coef;
double[] zoom, rzoom;
String[] bind;