feat: add Calculator & Grapher tool
Adds a full-featured mathematical calculator and interactive function grapher at /calculate. Powered by Math.js v15 with a HiDPI Canvas renderer for the graph. - Evaluates arbitrary math expressions (trig, log, complex, matrices, factorials, combinatorics, and more) with named variable scope - Persists history (50 entries) and variables via localStorage - 32 quick-insert buttons for constants and functions - Interactive graph: pan (drag), zoom (scroll), crosshair tooltip showing cursor coords and f₁(x)…f₈(x) values simultaneously - Up to 8 color-coded functions with inline color pickers and visibility toggles - Discontinuity detection for functions like tan(x) - Adaptive grid labels that rescale with zoom - Responsive layout: 2/5–3/5 split on desktop, tabbed on mobile Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
16
app/(app)/calculate/page.tsx
Normal file
16
app/(app)/calculate/page.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { Metadata } from 'next';
|
||||
import Calculator from '@/components/calculate/Calculator';
|
||||
import { AppPage } from '@/components/layout/AppPage';
|
||||
import { getToolByHref } from '@/lib/tools';
|
||||
|
||||
const tool = getToolByHref('/calculate')!;
|
||||
|
||||
export const metadata: Metadata = { title: tool.title, description: tool.summary };
|
||||
|
||||
export default function CalculatePage() {
|
||||
return (
|
||||
<AppPage title={tool.title} description={tool.summary} icon={tool.icon}>
|
||||
<Calculator />
|
||||
</AppPage>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user