avocado-old/packages/math/index.hooks.js
2020-06-19 17:59:14 -05:00

39 lines
687 B
JavaScript

import * as MathExt from '.';
export function behaviorContextGlobals() {
return {
Math: [MathExt, 'Math'],
};
}
export function behaviorContextTypes() {
return {
Math: (Math) => ({
floor: {
type: 'number',
label: 'Floor $1.',
args: [
['operand', {
type: 'number',
}],
],
},
randomNumber: {
type: 'number',
label: 'Random number between $1 and $2.',
args: [
['min', {
type: 'number',
}],
['max', {
type: 'number',
}],
],
},
Vector: {
type: 'Vector',
},
}),
};
}