Changeset 2442:2750ac386c39 in roaraudio
- Timestamp:
- 08/19/09 23:02:16 (15 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroardsp/poly.h
r1370 r2442 1 //math.h: 1 //poly.h: 2 3 // was math.h 2 4 3 5 /* 4 * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008 6 * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008, 2009 5 7 * 6 8 * This file is part of libroar a part of RoarAudio, … … 45 47 int roar_math_mkpoly_5x5 (float * poly, float * data); 46 48 49 float roar_math_cvpoly (float * poly, float t, int len); 47 50 float roar_math_cvpoly_4x4 (float * poly, float t); 48 51 -
libroardsp/poly.c
r1369 r2442 105 105 106 106 107 float roar_math_cvpoly (float * poly, float t, int len) { 108 float ret = 0; 109 float ct = 1; 110 int i; 111 112 if ( poly == NULL ) 113 return 0; 114 115 switch (len) { 116 case 4: return roar_math_cvpoly_4x4(poly, t); 117 } 118 119 for (i = 0; i < len; i++) { 120 ret += poly[i] * ct; 121 ct *= t; 122 } 123 124 return ret; 125 } 126 107 127 float roar_math_cvpoly_4x4 (float * poly, float t) { 108 128 float ret = poly[0];
Note: See TracChangeset
for help on using the changeset viewer.