Examples of newFloat()


Examples of org.jruby.Ruby.newFloat()

        Vec2 vec = (Vec2) args[0].toJava(Vec2.class);
        double scalar = (Double) args[1].toJava(Double.class);
        assert (scalar >= 0 && scalar < 1.0) :
        "Lerp value " + scalar + " out of range 0 .. 1.0";
        return Vec2.rbNew(context, this.getMetaClass(), new IRubyObject[]{
                runtime.newFloat(jx + (vec.jx - jx) * scalar),
        runtime.newFloat(jy + (vec.jy - jy) * scalar)});
    }

    /**
    *
 
View Full Code Here

Examples of org.jruby.Ruby.newFloat()

        double scalar = (Double) args[1].toJava(Double.class);
        assert (scalar >= 0 && scalar < 1.0) :
        "Lerp value " + scalar + " out of range 0 .. 1.0";
        return Vec2.rbNew(context, this.getMetaClass(), new IRubyObject[]{
                runtime.newFloat(jx + (vec.jx - jx) * scalar),
        runtime.newFloat(jy + (vec.jy - jy) * scalar)});
    }

    /**
    *
    * @param context
View Full Code Here

Examples of org.jruby.Ruby.newFloat()

    */
    @JRubyMethod(name = "copy")

    public IRubyObject copy(ThreadContext context) {
        Ruby runtime = context.runtime;
        return Vec2.rbNew(context, this.getMetaClass(), new IRubyObject[]{runtime.newFloat(jx), runtime.newFloat(jy)});
    }

    /**
    *
    * @param context
View Full Code Here

Examples of org.jruby.Ruby.newFloat()

    */
    @JRubyMethod(name = "copy")

    public IRubyObject copy(ThreadContext context) {
        Ruby runtime = context.runtime;
        return Vec2.rbNew(context, this.getMetaClass(), new IRubyObject[]{runtime.newFloat(jx), runtime.newFloat(jy)});
    }

    /**
    *
    * @param context
View Full Code Here

Examples of org.jruby.Ruby.newFloat()

    */
    @JRubyMethod(name = "to_a")

    public IRubyObject toArray(ThreadContext context) {
        Ruby runtime = context.runtime;
        return RubyArray.newArray(context.getRuntime(), new IRubyObject[]{runtime.newFloat(jx), runtime.newFloat(jy)});
    }

    /**
    *
    * @param context
View Full Code Here

Examples of org.jruby.Ruby.newFloat()

    */
    @JRubyMethod(name = "to_a")

    public IRubyObject toArray(ThreadContext context) {
        Ruby runtime = context.runtime;
        return RubyArray.newArray(context.getRuntime(), new IRubyObject[]{runtime.newFloat(jx), runtime.newFloat(jy)});
    }

    /**
    *
    * @param context
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.