mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-12-29 16:16:02 +00:00
51 lines
915 B
TypeScript
51 lines
915 B
TypeScript
|
|
import type { GenericCalcType } from './types';
|
||
|
|
|
||
|
|
export const areaSphere: GenericCalcType = {
|
||
|
|
title: 'Area of a Sphere',
|
||
|
|
name: 'area-sphere',
|
||
|
|
description: 'Area of a Sphere',
|
||
|
|
formula: 'A = 4 * pi * r**2',
|
||
|
|
selections: [],
|
||
|
|
variables: [
|
||
|
|
{
|
||
|
|
name: 'A',
|
||
|
|
title: 'Area',
|
||
|
|
unit: 'mm2'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'r',
|
||
|
|
title: 'Radius',
|
||
|
|
unit: 'mm',
|
||
|
|
default: 1
|
||
|
|
}
|
||
|
|
]
|
||
|
|
};
|
||
|
|
|
||
|
|
export const volumeSphere: GenericCalcType = {
|
||
|
|
title: 'Volume of a Sphere',
|
||
|
|
name: 'volume-sphere',
|
||
|
|
description: 'Volume of a Sphere',
|
||
|
|
formula: 'v = (4/3) * pi * r**3',
|
||
|
|
selections: [],
|
||
|
|
variables: [
|
||
|
|
{
|
||
|
|
name: 'v',
|
||
|
|
title: 'Volume',
|
||
|
|
unit: 'mm3'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: 'r',
|
||
|
|
title: 'Radius',
|
||
|
|
unit: 'mm',
|
||
|
|
default: 1,
|
||
|
|
alternates: [
|
||
|
|
{
|
||
|
|
title: 'Diameter',
|
||
|
|
formula: 'x = 2 * v',
|
||
|
|
unit: 'mm'
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
]
|
||
|
|
};
|