feat: remove temperature conversion from generic-calc

This commit removes the temperature conversion tool from the
generic-calc tool. This is because the tool was causing issues.

The following files were modified:
- src/pages/tools/number/generic-calc/data/index.ts
- src/pages/tools/number/generic-calc/data/temperature.ts
- package.json
- .idea/workspace.xml
This commit is contained in:
Ibrahima G. Coulibaly
2025-10-02 22:18:34 +01:00
parent 579cfeb55f
commit 28f4c64d30
8 changed files with 3957 additions and 2971 deletions

View File

@@ -41,7 +41,7 @@ export async function changeAudioSpeed(
const outputName = `output.${outputFormat}`;
await ffmpeg.writeFile(fileName, await fetchFile(input));
const audioFilter = computeAudioFilter(newSpeed);
let args = ['-i', fileName, '-filter:a', audioFilter];
const args = ['-i', fileName, '-filter:a', audioFilter];
if (outputFormat === 'mp3') {
args.push('-b:a', '192k', '-f', 'mp3', outputName);
} else if (outputFormat === 'aac') {

View File

@@ -3,13 +3,11 @@ import voltageDropInWire from './voltageDropInWire';
import sphereArea from './sphereArea';
import sphereVolume from './sphereVolume';
import slackline from './slackline';
import temperatureConversion from './temperature';
export default [
ohmslaw,
voltageDropInWire,
sphereArea,
sphereVolume,
slackline,
temperatureConversion
slackline
];

View File

@@ -1,59 +0,0 @@
import type { GenericCalcType } from './types';
const temperatureConversion: GenericCalcType = {
icon: 'carbon:temperature-inversion',
keywords: ['temperature', 'conversion', 'celcius', 'fahrenheit', 'Kelvin'],
shortDescription:
'Convert temperatures between common scales like Celsius, Fahrenheit, Kelvin, and Rankine.',
name: 'Temperature Converter',
path: 'temperaure-conversion',
description:
'Convert temperatures between common scales like Celsius, Fahrenheit, Kelvin, and Rankine.',
longDescription: `This calculator allows you to convert temperatures between Celsius, Fahrenheit, Kelvin, and Rankine. It is useful for scientists, engineers, students, and anyone needing to switch between these temperature scales for various applications.
Formulas Used:
Celsius (°C) ↔ Fahrenheit (°F):
°F = (°C × 9/5) + 32, and °C = (°F - 32) × 5/9 ||
Celsius (°C) ↔ Kelvin (K):
K = °C + 273.15, and °C = K - 273.15 ||
Celsius (°C) ↔ Rankine (°R):
°R = (°C + 273.15) × 9/5, and °C = (°R - 491.67) × 5/9 ||
Kelvin (K) ↔ Fahrenheit (°F):
°F = (K - 273.15) × 9/5 + 32, and K = (°F - 32) × 5/9 + 273.15 ||
Kelvin (K) ↔ Rankine (°R):
°R = K × 9/5, and K = °R × 5/9`,
formula: 'TdegC = (TdegF - 32) * 5/9',
presets: [],
variables: [
{
name: 'TdegC',
title: 'Celsius',
unit: 'tempC'
},
{
name: 'TdegF',
title: 'Farenheit',
unit: 'tempF',
default: 32,
alternates: [
{
title: 'Kelvin',
formula: 'x = (v -32) * 5/9 + 273.15',
unit: 'tempK'
},
{
title: 'Rankine',
formula: 'x = v + 459.67',
unit: 'tempR'
}
]
}
]
};
export default temperatureConversion;

View File

@@ -28,7 +28,7 @@ export async function convertPdfToPngImages(pdfFile: File): Promise<{
canvas.width = viewport.width;
canvas.height = viewport.height;
await page.render({ canvasContext: context, viewport }).promise;
await page.render({ canvas, canvasContext: context, viewport }).promise;
const blob = await new Promise<Blob>((resolve) =>
canvas.toBlob((b) => b && resolve(b), 'image/png')

View File

@@ -2,4 +2,6 @@ export type InitialValuesType = {
quality: 'mid' | 'high' | 'low' | 'ultra';
fps: string;
scale: string;
start: number;
end: number;
};