当前位置: 首页>>代码示例>>Java>>正文


Java Floats.isFinite方法代码示例

本文整理汇总了Java中com.google.common.primitives.Floats.isFinite方法的典型用法代码示例。如果您正苦于以下问题:Java Floats.isFinite方法的具体用法?Java Floats.isFinite怎么用?Java Floats.isFinite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.common.primitives.Floats的用法示例。


在下文中一共展示了Floats.isFinite方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: func_183006_b

import com.google.common.primitives.Floats; //导入方法依赖的package包/类
private boolean func_183006_b(C03PacketPlayer p_183006_1_)
{
    return !Doubles.isFinite(p_183006_1_.getPositionX()) || !Doubles.isFinite(p_183006_1_.getPositionY()) || !Doubles.isFinite(p_183006_1_.getPositionZ()) || !Floats.isFinite(p_183006_1_.getPitch()) || !Floats.isFinite(p_183006_1_.getYaw());
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:NetHandlerPlayServer.java

示例2: apply

import com.google.common.primitives.Floats; //导入方法依赖的package包/类
public boolean apply(String p_apply_1_)
{
    Float f = Floats.tryParse(p_apply_1_);
    return p_apply_1_.length() == 0 || f != null && Floats.isFinite(f.floatValue()) && f.floatValue() >= 0.0F;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:GuiCustomizeWorldScreen.java

示例3: isMovePlayerPacketInvalid

import com.google.common.primitives.Floats; //导入方法依赖的package包/类
private static boolean isMovePlayerPacketInvalid(CPacketPlayer packetIn)
{
    return Doubles.isFinite(packetIn.getX(0.0D)) && Doubles.isFinite(packetIn.getY(0.0D)) && Doubles.isFinite(packetIn.getZ(0.0D)) && Floats.isFinite(packetIn.getPitch(0.0F)) && Floats.isFinite(packetIn.getYaw(0.0F)) ? false : Math.abs(packetIn.getX(0.0D)) <= 3.0E7D && Math.abs(packetIn.getX(0.0D)) <= 3.0E7D;
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:5,代码来源:NetHandlerPlayServer.java

示例4: isMoveVehiclePacketInvalid

import com.google.common.primitives.Floats; //导入方法依赖的package包/类
private static boolean isMoveVehiclePacketInvalid(CPacketVehicleMove packetIn)
{
    return !Doubles.isFinite(packetIn.getX()) || !Doubles.isFinite(packetIn.getY()) || !Doubles.isFinite(packetIn.getZ()) || !Floats.isFinite(packetIn.getPitch()) || !Floats.isFinite(packetIn.getYaw());
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:5,代码来源:NetHandlerPlayServer.java

示例5: isMovePlayerPacketInvalid

import com.google.common.primitives.Floats; //导入方法依赖的package包/类
private static boolean isMovePlayerPacketInvalid(CPacketPlayer packetIn)
{
    return Doubles.isFinite(packetIn.getX(0.0D)) && Doubles.isFinite(packetIn.getY(0.0D)) && Doubles.isFinite(packetIn.getZ(0.0D)) && Floats.isFinite(packetIn.getPitch(0.0F)) && Floats.isFinite(packetIn.getYaw(0.0F)) ? false : Math.abs(packetIn.getX(0.0D)) <= 3.0E7D && Math.abs(packetIn.getZ(0.0D)) <= 3.0E7D;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:NetHandlerPlayServer.java

示例6: apply

import com.google.common.primitives.Floats; //导入方法依赖的package包/类
public boolean apply(@Nullable String p_apply_1_)
{
    Float f = Floats.tryParse(p_apply_1_);
    return p_apply_1_.isEmpty() || f != null && Floats.isFinite(f.floatValue()) && f.floatValue() >= 0.0F;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:GuiCustomizeWorldScreen.java

示例7: tryParseValidFloat

import com.google.common.primitives.Floats; //导入方法依赖的package包/类
/**
 * Attempts to parse a floating-point value from a string, and also assures that this value is finite and
 * positive
 */
public boolean tryParseValidFloat(String p_178956_1_)
{
    Float f = Floats.tryParse(p_178956_1_);
    return p_178956_1_.length() == 0 || f != null && Floats.isFinite(f.floatValue()) && f.floatValue() >= 0.0F;
}
 
开发者ID:lumien231,项目名称:Simple-Dimensions,代码行数:10,代码来源:GuiCustomizeDimension.java

示例8: isMovePlayerPacketInvalid

import com.google.common.primitives.Floats; //导入方法依赖的package包/类
private static boolean isMovePlayerPacketInvalid(CPacketPlayer packetIn) {
	if (Doubles.isFinite(packetIn.getX(0.0D)) && Doubles.isFinite(packetIn.getY(0.0D)) && Doubles.isFinite(packetIn.getZ(0.0D)) && Floats.isFinite(packetIn.getPitch(0.0F)) && Floats.isFinite(packetIn.getYaw(0.0F)))
		return Math.abs(packetIn.getX(0.0D)) > 3.0E7D || Math.abs(packetIn.getY(0.0D)) > 3.0E7D || Math.abs(packetIn.getZ(0.0D)) > 3.0E7D;
	else 
		return true;
}
 
开发者ID:MrNobody98,项目名称:morecommands,代码行数:7,代码来源:PatchNetHandlerPlayServer.java

示例9: b

import com.google.common.primitives.Floats; //导入方法依赖的package包/类
private static boolean b(PacketPlayInFlying packetplayinflying) {
    return Doubles.isFinite(packetplayinflying.a(0.0D)) && Doubles.isFinite(packetplayinflying.b(0.0D)) && Doubles.isFinite(packetplayinflying.c(0.0D)) && Floats.isFinite(packetplayinflying.b(0.0F)) && Floats.isFinite(packetplayinflying.a(0.0F)) ? false : Math.abs(packetplayinflying.a(0.0D)) <= 3.0E7D && Math.abs(packetplayinflying.a(0.0D)) <= 3.0E7D;
}
 
开发者ID:bergerkiller,项目名称:SpigotSource,代码行数:4,代码来源:PlayerConnection.java


注:本文中的com.google.common.primitives.Floats.isFinite方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。