Skip to content

Main content

Convert Angular Velocity Source Code

Browse the implementation files for Convert Angular Velocity.
@tool.io/tools/convert/angular-velocity source ↗
tool.ts typescript
import { convertAngularVelocity as convertPortableAngularVelocity } from '@tool.io/tools/convert/angular-velocity';
import { measureFactorOptions } from '../tool';
import { measureFactors } from './factors';

export const convertAngularVelocity = (
	value: number,
	from: string,
	to: string
) => convertPortableAngularVelocity(value, from, to) ?? '';

export const Tool: TypeTool = {
	name: 'Convert Angular Velocity',
	slug: 'convert/angular-velocity',
	tool: convertAngularVelocity,
	intro:
		'Convert angular velocity and rotational speed between radians, degrees, revolutions, and RPM over common time units.',
	i: [
		{
			example: '60',
			label: 'Value',
			placeholder: '60',
			type: 'number'
		},
		{
			example: 'rpm',
			label: 'From',
			placeholder: 'Select the source angular velocity unit',
			options: measureFactorOptions(measureFactors, 'rpm'),
			type: 'select',
			value: 'rpm'
		},
		{
			example: 'rad/s',
			label: 'To',
			placeholder:
				'Select the destination angular velocity unit',
			options: measureFactorOptions(measureFactors, 'rad/s'),
			type: 'select',
			value: 'rad/s'
		}
	],
	o: [
		{
			example: '6.283185307179586',
			label: 'Angular velocity',
			placeholder: 'Converted angular velocity',
			render: 'textarea',
			type: 'number'
		}
	],
	swap: {
		inputs: [1, 2],
		name: 'Swap angular velocity units',
		state: false
	},
	alternative: [
		{ title: 'Convert angle', url: '/convert/angle' },
		{ title: 'Convert time', url: '/convert/time' }
	],
	cite: [
		{
			title: 'Angular velocity — Wikipedia',
			url: 'https://en.wikipedia.org/wiki/Angular_velocity'
		},
		{
			title: 'NIST Guide to SI conversion factors',
			url: 'https://www.nist.gov/pml/special-publication-811/nist-guide-si-appendix-b-conversion-factors'
		}
	]
};

export default Tool;

Description

Browse the implementation files for Convert Angular Velocity.

References

  1. Tool.io on GitHub
  2. Tool.io TypeScript tools library

Similar or alternative tools