@Override public void integratorAngularSetDragVertical( final float d) { this.drag_vertical = (float) RangeCheck.checkGreaterEqualDouble( RangeCheck .checkLessEqualDouble((double) d, "Drag factor", 1.0, "Maximum drag"), "Drag factor", 0.0, "Minimum drag"); }
FakeFramebufferColorAttachmentPoint( final FakeContext in_context, final int in_index) { super(in_context); this.index = RangeCheck.checkIncludedInInteger( in_index, "Attachment point", Ranges.NATURAL_INTEGER, "Valid attachment points"); }
@Override public void integratorLinearSetAcceleration( final float a) { this.acceleration = (float) RangeCheck.checkGreaterDouble( (double) a, "Acceleration", 0.0, "Minimum acceleration"); }
NullCheck.notNull(min_filter, "Minification filter"); NullCheck.notNull(mag_filter, "Magnification filter"); RangeCheck.checkGreaterEqualLong(width, "Width", 2L, "Valid widths"); RangeCheck.checkGreaterEqualLong(height, "Height", 2L, "Valid heights");
final double z_far) RangeCheck.checkGreaterEqualDouble( z_near, "Near Z", 0.0, "Minimum Z distance"); RangeCheck.checkLessDouble(z_near, "Near Z", z_far, "Far Z");
@Override public void integratorLinearTargetSetMaximumSpeed( final float s) { this.target_maximum_speed = (float) RangeCheck.checkGreaterEqualDouble( (double) s, "Speed limit", 0.0, "Minimum limit"); }
@Override public JCGLArrayBufferType arrayBufferAllocate( final long size, final JCGLUsageHint usage) throws JCGLException { RangeCheck.checkIncludedInLong( size, "Size", Ranges.NATURAL_LONG, "Valid size range"); FakeArrayBuffers.LOG.debug( "allocate ({} bytes, {})", Long.valueOf(size), usage); final ByteBuffer data = ByteBuffer.allocate((int) size); final FakeArrayBuffer ao = new FakeArrayBuffer( this.context, this.context.getFreshID(), data, usage); this.actualBind(ao); return ao; }
private JPAlignerBasic( final int in_width) { this.width = RangeCheck.checkGreaterInteger( in_width, "Width", 0, "Minimum width"); this.lines_formatted = new ArrayList<>(16); this.line_buffer = new StringBuilder(this.width); }
/** * Construct an inclusive range. The constructor enforces the invariant * {@code lower <= upper}. * * @param in_lower The lower bound * @param in_upper The upper bound */ public RangeInclusiveD( final double in_lower, final double in_upper) { RangeCheck.checkLessEqualDouble(in_lower, "lower", in_upper, "upper"); this.lower = in_lower; this.upper = in_upper; this.interval = this.upper - this.lower; }
/** * Construct an inclusive range. The constructor enforces the invariant * {@code lower <= upper}. * * @param in_lower The lower bound * @param in_upper The upper bound */ public RangeInclusiveB( final BigInteger in_lower, final BigInteger in_upper) { NullCheck.notNull(in_lower, "Lower"); NullCheck.notNull(in_upper, "Upper"); RangeCheck.checkLessEqualBig(in_lower, "lower", in_upper, "upper"); this.lower = in_lower; this.upper = in_upper; final BigInteger i = this.upper.subtract(this.lower).add(BigInteger.ONE); assert i != null; this.interval = i; }
NullCheck.notNull(min_filter, "Minification filter"); NullCheck.notNull(mag_filter, "Magnification filter"); RangeCheck.checkGreaterEqualLong(width, "Width", 2L, "Valid widths"); RangeCheck.checkGreaterEqualLong(height, "Height", 2L, "Valid heights");
final double z_far) RangeCheck.checkGreaterEqualDouble( z_near, "Near Z", 0.0, "Minimum Z distance"); RangeCheck.checkLessDouble(z_near, "Near Z", z_far, "Far Z");
@Override public void integratorLinearZoomSetMaximumSpeed( final double s) { this.zoom_maximum_speed = RangeCheck.checkGreaterEqualDouble( s, "Speed limit", 0.0, "Minimum limit"); } }
@Override public JCGLArrayBufferType arrayBufferAllocate( final long size, final JCGLUsageHint usage) throws JCGLException { RangeCheck.checkIncludedInLong( size, "Size", Ranges.NATURAL_LONG, "Valid size range"); LOG.debug( "allocate ({} bytes, {})", Long.valueOf(size), usage); final ByteBuffer data = ByteBuffer.allocate((int) size); final FakeArrayBuffer ao = new FakeArrayBuffer( this.context, this.context.getFreshID(), data, usage); this.actualBind(ao); return ao; }
private JPAlignerBasic( final int in_width) { this.width = RangeCheck.checkGreaterInteger( in_width, "Width", 0, "Minimum width"); this.lines_formatted = new ArrayList<>(16); this.line_buffer = new StringBuilder(this.width); }
/** * Check preconditions for the type. */ @Value.Check default void checkPreconditions() { RangeCheck.checkLessEqualDouble( this.lower(), "lower", this.upper(), "upper"); } }
/** * Check preconditions for the type. */ @Value.Check default void checkPreconditions() { RangeCheck.checkLessEqualBig( this.lower(), "lower", this.upper(), "upper"); } }
@Override public void integratorAngularOrbitInclineSetDrag( final float d) { this.drag_incline = (float) RangeCheck.checkGreaterEqualDouble( RangeCheck .checkLessEqualDouble((double) d, "Drag factor", 1.0, "Maximum drag"), "Drag factor", 0.0, "Minimum drag"); }
@Override public JCGLTexture2DUpdateType getTextureUpdate2D( final JCGLTexture2DUsableType t, final JCGLTLTextureDataType data) { final JCGLTexture2DUpdateType u = JCGLTextureUpdates.newUpdateReplacingAll2D(t); final int tw = (int) t.textureGetWidth(); final int th = (int) t.textureGetHeight(); final long dw = data.getWidth(); final long dh = data.getHeight(); RangeCheck.checkGreaterEqualLong( (long) tw, "Texture width", dw, "Data width"); RangeCheck.checkGreaterEqualLong( (long) th, "Texture height", dh, "Data height"); JCGLTLTextureUpdateProvider.populate( t.textureGetFormat(), data, u.getData(), tw, th); return u; }
LWJGL3FramebufferDrawBuffer( final LWJGL3Context in_context, final int in_index) { super(in_context); this.index = RangeCheck.checkIncludedInInteger( in_index, "Draw buffer", Ranges.NATURAL_INTEGER, "Valid draw buffers"); }