소스 검색

Update getRandomPosition() method

Wyatt Gillette 4 달 전
부모
커밋
22c64b1e70
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      jme3-examples/src/main/java/jme3test/audio/TestReverb.java

+ 4 - 4
jme3-examples/src/main/java/jme3test/audio/TestReverb.java

@@ -103,10 +103,10 @@ public class TestReverb extends SimpleApplication {
     }
 
     private Vector3f getRandomPosition() {
-        Vector3f vec = new Vector3f();
-        vec.setX(FastMath.nextRandomFloat());
-        vec.setY(FastMath.nextRandomFloat());
-        vec.setZ(FastMath.nextRandomFloat());
+        float x = FastMath.nextRandomFloat();
+        float y = FastMath.nextRandomFloat();
+        float z = FastMath.nextRandomFloat();
+        Vector3f vec = new Vector3f(x, y, z);
         vec.multLocal(40, 2, 40);
         vec.subtractLocal(20, 1, 20);
         return vec;