Skip to main content

Power

Inputs: i1
Outputs: o1

Emits messages with values equal to the power of the specified exponent represented by the number (value) regardless the time field of the message.

The Power operator does not hold a message buffer on i1, so it emits a modified version of the message through o1 right after it receives a message on i1.

y(tn)=x(tn)py(t_n)=x(t_n)^{p}

Parameters

id: The id of the operator

value: The exponent.

Usage

import { Program, Power } from "@rtbot-dev/rtbot";

const id = "id";
const value = 2.71;

const program = new Program();
program.addOperator(new Power(id, value));