org.jruby.Ruby.getComplex()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.jruby.Ruby.getComplex方法的一些代码示例,展示了Ruby.getComplex的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getComplex方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getComplex

Ruby.getComplex介绍

暂无

代码示例

代码示例来源:origin: org.jruby/jruby-complete

/** rb_complex_new
 * 
 */
public static IRubyObject newComplexCanonicalize(ThreadContext context, IRubyObject x, IRubyObject y) {
  return canonicalizeInternal(context, context.runtime.getComplex(), x, y);
}

代码示例来源:origin: org.jruby/jruby-complete

/** rb_Complex/rb_Complex2
 * 
 */
public static IRubyObject newComplexConvert(ThreadContext context, IRubyObject x, IRubyObject y) {
  return convert(context, context.runtime.getComplex(), x, y);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/** rb_complex_raw
 * 
 */
static RubyComplex newComplexRaw(Ruby runtime, IRubyObject x, RubyObject y) {
  return new RubyComplex(runtime, runtime.getComplex(), x, y);
}

代码示例来源:origin: org.jruby/jruby-core

/** rb_complex_new
 * 
 */
public static IRubyObject newComplexCanonicalize(ThreadContext context, IRubyObject x, IRubyObject y) {
  return canonicalizeInternal(context, context.runtime.getComplex(), x, y);
}

代码示例来源:origin: org.jruby/jruby-core

/** rb_Complex/rb_Complex2
 * 
 */
public static IRubyObject newComplexConvert(ThreadContext context, IRubyObject x, IRubyObject y) {
  return convert(context, context.runtime.getComplex(), x, y);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/** rb_complex_new
 * 
 */
public static IRubyObject newComplexCanonicalize(ThreadContext context, IRubyObject x, IRubyObject y) {
  return canonicalizeInternal(context, context.runtime.getComplex(), x, y);
}

代码示例来源:origin: org.jruby/jruby-complete

/** rb_complex_polar
 * 
 */
static IRubyObject newComplexPolar(ThreadContext context, IRubyObject x, IRubyObject y) {
  return f_complex_polar(context, context.runtime.getComplex(), x, y);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/** rb_Complex/rb_Complex2
 * 
 */
public static IRubyObject newComplexConvert(ThreadContext context, IRubyObject x, IRubyObject y) {
  return convert(context, context.runtime.getComplex(), x, y);
}

代码示例来源:origin: org.jruby/jruby-complete

/** rb_complex_raw1
 * 
 */
public static RubyComplex newComplexRaw(Ruby runtime, IRubyObject x) {
  return new RubyComplex(runtime, runtime.getComplex(), x, RubyFixnum.zero(runtime));
}

代码示例来源:origin: org.jruby/jruby-core

/** rb_complex_raw1
 * 
 */
public static RubyComplex newComplexRaw(Ruby runtime, IRubyObject x) {
  return new RubyComplex(runtime, runtime.getComplex(), x, RubyFixnum.zero(runtime));
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/** rb_complex_raw1
 * 
 */
static RubyComplex newComplexRaw(Ruby runtime, IRubyObject x) {
  return new RubyComplex(runtime, runtime.getComplex(), x, RubyFixnum.zero(runtime));
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE, compat = RUBY1_9)
public static IRubyObject new_complex(ThreadContext context, IRubyObject recv) {
  return Helpers.invoke(context, context.runtime.getComplex(), "convert");
}
@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE, compat = RUBY1_9)

代码示例来源:origin: org.jruby/jruby-complete

@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE)
public static IRubyObject new_complex(ThreadContext context, IRubyObject recv, IRubyObject arg0) {
  RubyClass complex = context.runtime.getComplex();
  return sites(context).convert_complex.call(context, complex, complex, arg0);
}
@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE)

代码示例来源:origin: org.jruby/jruby-core

@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE)
public static IRubyObject new_complex(ThreadContext context, IRubyObject recv, IRubyObject arg0) {
  RubyClass complex = context.runtime.getComplex();
  return sites(context).convert_complex.call(context, complex, complex, arg0);
}
@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE)

代码示例来源:origin: org.jruby/jruby-core

@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE)
public static IRubyObject new_complex(ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1) {
  RubyClass complex = context.runtime.getComplex();
  return sites(context).convert_complex.call(context, complex, complex, arg0, arg1);
}

代码示例来源:origin: org.jruby/jruby-complete

@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE)
public static IRubyObject new_complex(ThreadContext context, IRubyObject recv) {
  RubyClass complex = context.runtime.getComplex();
  return sites(context).convert_complex.call(context, complex, complex);
}
@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE)

代码示例来源:origin: org.jruby/jruby-complete

@JRubyMethod(name = "Complex", module = true, visibility = PRIVATE)
public static IRubyObject new_complex(ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1) {
  RubyClass complex = context.runtime.getComplex();
  return sites(context).convert_complex.call(context, complex, complex, arg0, arg1);
}

代码示例来源:origin: org.jruby/jruby-core

/** m_sin
 * 
 */
private static IRubyObject m_sin(ThreadContext context, IRubyObject x) {
  if (f_real_p(context, x)) return RubyMath.sin(context, x, x);
  RubyComplex complex = (RubyComplex)x;
  return newComplex(context, context.runtime.getComplex(),
           f_mul(context, RubyMath.sin(context, x, complex.real), RubyMath.cosh(context, x, complex.image)),
           f_mul(context, RubyMath.cos(context, x, complex.real), RubyMath.sinh(context, x, complex.image)));
}

代码示例来源:origin: org.jruby/jruby-complete

/** m_sin
 * 
 */
private static IRubyObject m_sin(ThreadContext context, IRubyObject x) {
  if (f_real_p(context, x)) return RubyMath.sin(context, x, x);
  RubyComplex complex = (RubyComplex)x;
  return newComplex(context, context.runtime.getComplex(),
           f_mul(context, RubyMath.sin(context, x, complex.real), RubyMath.cosh(context, x, complex.image)),
           f_mul(context, RubyMath.cos(context, x, complex.real), RubyMath.sinh(context, x, complex.image)));
}

代码示例来源:origin: org.jruby/jruby-complete

/** m_cos
 * 
 */
private static IRubyObject m_cos(ThreadContext context, IRubyObject x) {
  if (f_real_p(context, x)) return RubyMath.cos(context, x, x);
  RubyComplex complex = (RubyComplex)x;
  return newComplex(context, context.runtime.getComplex(),
           f_mul(context, RubyMath.cos(context, x, complex.real), RubyMath.cosh(context, x, complex.image)),
           f_mul(context, f_negate(context, RubyMath.sin(context, x, complex.real)), RubyMath.sinh(context, x, complex.image)));
}

相关文章

微信公众号

最新文章

更多

Ruby类方法