本文整理汇总了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());
}
示例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;
}
示例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;
}
示例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());
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}