thanks, that worked, I need to grow a feeling for those * and &
On Tue, 26 Aug 2014 12:26:43 +
nikki via Digitalmars-d-learn wrote:
> this errors witha : Error: function test.lineair_interpolation
> (float p) is not callable using argument types (), but I don't
> really know where to go from here.
you need to use '&' to get function pointer. i.e.
write
On Tuesday, 26 August 2014 at 12:26:45 UTC, nikki wrote:
void main()
{
writeln(interpolate(100,100,10, lineair_interpolation));
}
this errors witha : Error: function test.lineair_interpolation
(float p) is not callable using argument types (), but I don't
really know where to go from here.
as
"float function(float) easing" as far as I know and could find
here http://dlang.org/deprecate.html#C-style function pointers.
so my code is written as:
import std.stdio;
float interpolate(float from, float to, float amount, float
function(float) easing)
{
return from + (to - fr
On 11-11-2011 11:54, Aaron P wrote:
This is a little advanced for me, but I'd rather fix that one line in a
library somewhere than compile with -d.
I get an error message "C-style function pointer and pointer to array
syntax is deprecated. Use 'function' to declare function pointers."
Can someo
This is a little advanced for me, but I'd rather fix that one line in a
library somewhere than compile with -d.
I get an error message "C-style function pointer and pointer to array
syntax is deprecated. Use 'function' to declare function pointers."
Can someone explain how this keyword is use