From 7e6edf5b4f42c3017b56ed7a7795e76e85760e11 Mon Sep 17 00:00:00 2001 From: Entkenntnis Date: Thu, 11 Apr 2024 20:31:34 +0200 Subject: [PATCH] fix: hide zero as summand --- .../math-skills/exercise-implementations/rotate-point.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/math-skills/exercise-implementations/rotate-point.tsx b/apps/web/src/components/math-skills/exercise-implementations/rotate-point.tsx index b3f8657675..ddc855b5e5 100644 --- a/apps/web/src/components/math-skills/exercise-implementations/rotate-point.tsx +++ b/apps/web/src/components/math-skills/exercise-implementations/rotate-point.tsx @@ -33,12 +33,13 @@ export function RotatePoint() { ) : data.deg === 30 ? ( <> - C ( {data.ax} + {data.len > 2 ? 0.5 * data.len : ''} + C ( {data.ax === 0 ? null : <>{data.ax} + } + {data.len > 2 ? 0.5 * data.len : ''} {buildSqrt(3)} | {Math.round(data.cy)} ) ) : ( <> - C ( {Math.round(data.cx)} | {data.ay} +{' '} + C ( {Math.round(data.cx)} | {data.ay === 0 ? null : <>{data.ay} + } {data.len > 2 ? 0.5 * data.len : ''} {buildSqrt(3)} )