generated from erangel1/generic-template
initial commit. phase 1 complete
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
const convertJchToJab = ({ j, c, h, alpha }) => {
|
||||
let res = {
|
||||
mode: 'jab',
|
||||
j,
|
||||
a: c ? c * Math.cos((h / 180) * Math.PI) : 0,
|
||||
b: c ? c * Math.sin((h / 180) * Math.PI) : 0
|
||||
};
|
||||
if (alpha !== undefined) res.alpha = alpha;
|
||||
return res;
|
||||
};
|
||||
|
||||
export default convertJchToJab;
|
||||
Reference in New Issue
Block a user