calc
upvote if you feel terrible
calc
/// linear-interpolation
/// Calculate the definition of a line between two points
/// @param $map - A SASS map of viewport widths and size value pairs
/// @returns A linear equation as a calc() function
/// @example
/// font-size: linear-interpolation((320px: 18px, 768px: 26px));
/// @author Jake Wilson <[email protected]>
@function linear-interpolation($map) {
$keys: map-keys($map);
@if (length($keys) != 2) {
@error "linear-interpolation() $map must be exactly 2 values";
}
// The slope
$m: (map-get($map, nth($keys, 2)) - map-get($map, nth($keys, 1)))/(nth($keys, 2) - nth($keys,1));
// The y-intercept
$b: map-get($map, nth($keys, 1)) - $m * nth($keys, 1);
// Determine if the sign should be positive or negative
$sign: "+";
@if ($b < 0) {
$sign: "-";
$b: abs($b);
}
@return calc(#{$m*100}vw #{$sign} #{$b});
}
calc
x = "Ya why are you looking like this??!"
print("Go Find Yourself you creppy person!" + x)
const x = "really"
console.log("Go Find Yourself you creppy person!" + x)
calc
#include <iostream>
#define LOG(x) std::cout << x << std::endl
struct BadGamer{
void BAD(){
LOG("Uses Calculator and is Bad at games");
}
};
struct GoodGamer{
void GOOD(){
LOG("Doesn't use Calculator and is Good at games");
}
};
int main(){
int rep;
LOG("Do you Use calculator");
std::cin >> rep >> std::endl;
if(rep == 1){
BadGamer.BAD();
}
if(rep == 0){
GoodGamer.GOOD();
}else{
std::cout << "BRUUH" std::endl;
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us