Interpolating between things using lerp
.
function lerp (start, end, t) {
return start * (1 - t) + end * t;
}
#pragma once | |
#include "util/types.hpp" | |
#include "util/std.hpp" | |
#include "util/ndarray.hpp" | |
#include "util/collections.hpp" | |
#include "util/rand.hpp" | |
#include "util/hash.hpp" | |
#include "util/assert.hpp" | |
#include "util/bitset.hpp" |
I was written by someone who's about to embark on an internship that may turn into a full time junior developer role. | |
They wrote to ask me what advice I could offer. This is my reply: | |
I can only speak for myself as to what someone might want to see from a junior developer but here's my take on things. | |
When entering a new context I like to ask myself how I can most be of service. What would be a valuable contribution in this new arena. | |
What I think we need more than anything else in the developer community is compassion and the ability for developers of all levels | |
to understand at a deep level, how to support one another and how to be authentically kind. |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
//Primitive Type Comparison | |
var a = 1; | |
var b = 1; | |
var c = a; | |
console.log(a == b); //true | |
console.log(a === b); //true | |
console.log(a == c); //true | |
console.log(a === c); //true |