Found some of the problem, will debug that next
This commit is contained in:
parent
5d8f07c1b4
commit
3404534b10
|
@ -32,11 +32,9 @@ function getRange<a>(x: continuousDeclaration<a>) {
|
||||||
function getChartSettings<a>(
|
function getChartSettings<a>(
|
||||||
x: continuousDeclaration<a>
|
x: continuousDeclaration<a>
|
||||||
): FunctionChartSettings {
|
): FunctionChartSettings {
|
||||||
console.log("HERE");
|
let range = getRange(x);
|
||||||
let foo = getRange(x);
|
let min = range.floats ? range.floats.min : 0;
|
||||||
console.log("HIHI", foo);
|
let max = range.floats ? range.floats.max : 10;
|
||||||
let min = foo.floats ? foo.floats.min : 0;
|
|
||||||
let max = foo.floats ? foo.floats.max : 10;
|
|
||||||
return {
|
return {
|
||||||
start: min,
|
start: min,
|
||||||
stop: max,
|
stop: max,
|
||||||
|
@ -208,6 +206,7 @@ const SquiggleItem: React.FC<SquiggleItemProps> = ({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
)
|
||||||
</VariableBox>
|
</VariableBox>
|
||||||
);
|
);
|
||||||
case "arraystring":
|
case "arraystring":
|
||||||
|
@ -229,6 +228,17 @@ const SquiggleItem: React.FC<SquiggleItemProps> = ({
|
||||||
</VariableBox>
|
</VariableBox>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
case "lambda":
|
||||||
|
return (
|
||||||
|
<FunctionChart
|
||||||
|
fn={expression.value}
|
||||||
|
chartSettings={chartSettings}
|
||||||
|
environment={{
|
||||||
|
sampleCount: environment.sampleCount / 10,
|
||||||
|
xyPointLength: environment.xyPointLength / 10,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
case "lambdaDeclaration": {
|
case "lambdaDeclaration": {
|
||||||
switch (expression.value.tag) {
|
switch (expression.value.tag) {
|
||||||
case "Continuous": {
|
case "Continuous": {
|
||||||
|
@ -244,21 +254,16 @@ const SquiggleItem: React.FC<SquiggleItemProps> = ({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case "RelativeComparison": {
|
case "RelativeComparison": {
|
||||||
return <></>;
|
return <>"Relative"</>;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
return <>LambdaDeclaration: Should be unreachable</>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "lambda":
|
default: {
|
||||||
return (
|
return <>Should be unreachable</>;
|
||||||
<FunctionChart
|
}
|
||||||
fn={expression.value}
|
|
||||||
chartSettings={chartSettings}
|
|
||||||
environment={{
|
|
||||||
sampleCount: environment.sampleCount / 10,
|
|
||||||
xyPointLength: environment.xyPointLength / 10,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user