(x', y')^T = ((cosθ, -sinθ), (sinθ, cosθ)) * (x, y)^T
(multiplied out)
- x' = x cosθ - y sinθ
- y' = x sinθ + y cosθ
<html> | |
<head> | |
<style> | |
/* Edit this to customize font-size and other font properties */ | |
ul.tree-structure { | |
font-size: 1em; | |
font-family: inherit; | |
} |
# create all combinations | |
p_0 = [] | |
for a in range(10): | |
for b in range(10): | |
for c in range(10): | |
p_0.append([a, b, c]) | |
# hint 1 |
/BEGIN.*-+([^-]*)-+END/g |
const UPPERCASE_LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('') | |
const LOWERCASE_LETTERS = 'abcdefghijklmnopqrstuvwxyz'.split('') | |
const DIGITS = '0123456789'.split('') | |
const WHITESPACE = ' '.split('') | |
// TOKEN TYPES | |
const COEFF = 'COEFF' | |
const ELEM = 'ELEM' |
let fixLength = function(num, length) { | |
let numStr = "" + num; | |
if (parseInt(numStr, 10) < 0) return fixLength(0, length); | |
while (numStr.length < length) { | |
numStr = "0" + numStr; | |
} | |
return numStr; | |
}; |
public final class NumStringUtil { | |
private NumStringUtil() {} | |
/** | |
* If the number string given has length less than the desired length, then | |
* the string is left-padded with zeroes and returned. | |
* | |
* @param numStr string to left-pad with zeroes |