trigUnit.js 417 B

1234567891011121314
  1. import { factory } from '../../utils/factory.js';
  2. export var createTrigUnit = /* #__PURE__ */factory('trigUnit', ['typed'], _ref => {
  3. var {
  4. typed
  5. } = _ref;
  6. return {
  7. Unit: typed.referToSelf(self => x => {
  8. if (!x.hasBase(x.constructor.BASE_UNITS.ANGLE)) {
  9. throw new TypeError('Unit in function cot is no angle');
  10. }
  11. return typed.find(self, x.valueType())(x.value);
  12. })
  13. };
  14. });