Skip to content

Commit

Permalink
Jolt: add the "endl" constant
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Nov 13, 2024
1 parent 5261577 commit 8bfd331
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/github/stephengold/joltjni/Jolt.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ final public class Jolt {
* to expedite translation of C++ code
*/
final public static Object nullptr = null;
/**
* to expedite translation of C++ code
*/
final public static String endl = System.lineSeparator();
// *************************************************************************
// constructors

Expand Down
1 change: 0 additions & 1 deletion src/test/java/testjoltjni/app/helloworld/HelloWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ of this software and associated documentation files (the "Software"), to deal
public class HelloWorld {

static PrintStream cout=System.out;
static String endl=System.lineSeparator();



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class PerformanceTest {
private static PerformanceTestScene create_ragdoll_scene() {
return new RagdollScene(4, 10, 0.6f);
}
final private static String endl = System.lineSeparator();
// Disable common warnings triggered by Jolt

// Local includes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ of this software and associated documentation files (the "Software"), to deal
import com.github.stephengold.joltjni.enumerate.*;
import com.github.stephengold.joltjni.operator.Op;
import java.util.*;
import static com.github.stephengold.joltjni.Jolt.*;

/**
* A line-for-line Java translation of the Jolt Physics "ragdoll scene"
Expand All @@ -35,7 +36,7 @@ of this software and associated documentation files (the "Software"), to deal
// A scene that loads a part of a Horizon Zero Dawn level and drops many ragdolls on the terrain (motors enabled)
class RagdollScene implements PerformanceTestScene
{
final private static String endl = System.lineSeparator();

RagdollScene(int inNumPilesPerAxis, int inPileSize, float inVerticalSeparation) {
this.mNumPilesPerAxis = inNumPilesPerAxis;
this.mPileSize = inPileSize;
Expand Down

0 comments on commit 8bfd331

Please sign in to comment.