reflect-about-y-axis

▸ function reflectAboutYAxis (p: number[]): number[]

Defined in change-variables/double/reflect-about-y-axis.ts:16

Returns the result of reflecting the given polynomial about the Y-axis, i.e. perform the change of variables: p(x) <- p(-x).

example

reflectAboutYAxis([5,4,3,2,1]); //=> [5, -4, 3, -2, 1]

Parameters:

NameTypeDescription
pnumber[]a polynomial with coefficients given densely as an array of double floating point numbers from highest to lowest power, e.g. [5,-3,0] represents the polynomial 5x^2 - 3x

Returns: number[]