Skip to content

Commit 66803d0

Browse files
committed
Merge branch 'jdk17'
2 parents 951fea2 + 3d9d64e commit 66803d0

23 files changed

+12411
-12136
lines changed

.mvn/extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<extension>
44
<groupId>io.takari.polyglot</groupId>
55
<artifactId>polyglot-ruby</artifactId>
6-
<version>0.4.6</version>
6+
<version>0.4.8</version>
77
</extension>
88
</extensions>

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ end
1717

1818
desc 'Install'
1919
task :install do
20-
sh 'mvn dependency:copy'
20+
sh './mvnw dependency:copy'
2121
FileUtils.mv("target/propane-#{Propane::VERSION}.jar", 'lib')
2222
end
2323

propane.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Gem::Specification.new do |gem|
3232
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
3333
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
3434
gem.add_development_dependency 'jruby-openssl', '~> 0.10', '>=0.10.7'
35-
gem.add_development_dependency 'minitest', '~> 5.14'
35+
gem.add_development_dependency 'minitest', '~> 5.15'
3636
gem.add_runtime_dependency 'rake', '~> 13.0'
3737
gem.add_runtime_dependency 'arcball', '~> 1.2'
3838
gem.require_paths = ['lib']

src/main/java/monkstone/vecmath/vec2/Vec2.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*
2222
* fastAtan2 algorithm from https://github.com/libgdx/libgdx (Apache 2.0 license)
2323
*/
24+
import java.util.logging.Logger;
2425
import org.jruby.Ruby;
2526
import org.jruby.RubyArray;
2627
import org.jruby.RubyClass;
@@ -227,16 +228,24 @@ public IRubyObject dist(ThreadContext context, IRubyObject other) {
227228
double result = Math.hypot(jx - b.jx, jy - b.jy);
228229
return runtime.newFloat(result);
229230
}
231+
232+
@Deprecated
233+
@JRubyMethod(name = "cross", required = 1)
234+
public IRubyObject cross(ThreadContext context, IRubyObject other) {
235+
Logger log = Logger.getGlobal();
236+
log.warning("prefer ^ operator");
237+
return op_wedge(context, other);
238+
}
230239

231240
/**
232241
*
233242
* @param context ThreadContext
234243
* @param other IRubyObject
235-
* @return cross product IRubyObject
244+
* @return wedge product IRubyObject
236245
*/
237-
@JRubyMethod(name = "cross", required = 1)
246+
@JRubyMethod(name = "^", required = 1)
238247

239-
public IRubyObject cross(ThreadContext context, IRubyObject other) {
248+
public IRubyObject op_wedge(ThreadContext context, IRubyObject other) {
240249
Vec2 b = null;
241250
Ruby runtime = context.runtime;
242251
if (other instanceof Vec2) {

src/main/java/processing/awt/PGraphicsJava2D.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import java.util.Arrays;
3232
import java.util.HashMap;
3333
import java.util.Map;
34-
3534
import processing.core.*;
3635

3736

src/main/java/processing/awt/PImageAWT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import java.io.File;
3636
import java.io.IOException;
3737
import java.util.Iterator;
38-
3938
import javax.imageio.IIOImage;
4039
import javax.imageio.ImageIO;
4140
import javax.imageio.ImageTypeSpecifier;
@@ -44,7 +43,6 @@
4443
import javax.imageio.metadata.IIOInvalidTreeException;
4544
import javax.imageio.metadata.IIOMetadata;
4645
import javax.imageio.metadata.IIOMetadataNode;
47-
4846
import processing.core.PApplet;
4947
import processing.core.PImage;
5048

@@ -108,8 +106,8 @@ public PImageAWT(Image img) {
108106

109107
/**
110108
* Use the getNative() method instead, which allows library interfaces to be
111-
* written in a cross-platform fashion for desktop, Android, and others.
112-
* This is still included for PGraphics objects, which may need the image.
109+
* written in a cross-platform fashion for desktop, Android, and others.This is still included for PGraphics objects, which may need the image.
110+
* @return
113111
*/
114112
public Image getImage() { // ignore
115113
return (Image) getNative();

0 commit comments

Comments
 (0)