object PosZFloat
The companion object for PosZFloat
that offers
factory methods that produce PosZFloat
s, implicit
widening conversions from PosZFloat
to other
numeric types, and maximum and minimum constant values for
PosZFloat
.
- Source
- PosZFloat.scala
- Alphabetic
- By Inheritance
- PosZFloat
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
val
MaxValue: PosZFloat
The largest value representable as a non-negative
Float
, which isPosZFloat(3.4028235E38)
. -
final
val
MinValue: PosZFloat
The smallest value representable as a non-negative
Float
, which isPosZFloat(0.0F)
. -
implicit macro
def
apply(value: Float): PosZFloat
A factory method, implemented via a macro, that produces a
PosZFloat
if passed a validFloat
literal, otherwise a compile time error.A factory method, implemented via a macro, that produces a
PosZFloat
if passed a validFloat
literal, otherwise a compile time error.The macro that implements this method will inspect the specified
Float
expression at compile time. If the expression is a non-negativeFloat
literal, i.e., with a value greater than or equal to 0, it will return aPosZFloat
representing that value. Otherwise, the passedFloat
expression is either a literal that is negative, or is not a literal, so this method will give a compiler error.This factory method differs from the
from
factory method in that this method is implemented via a macro that inspectsFloat
literals at compile time, whereasfrom
inspectsFloat
values at run time.- value
the
Float
literal expression to inspect at compile time, and if non-negative, to return wrapped in aPosZFloat
at run time.- returns
the specified, valid
Float
literal value wrapped in aPosZFloat
. (If the specified expression is not a validFloat
literal, the invocation of this method will not compile.)
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
from(value: Float): Option[PosZFloat]
A factory method that produces an
Option[PosZFloat]
given aFloat
value.A factory method that produces an
Option[PosZFloat]
given aFloat
value.This method will inspect the passed
Float
value and if it is a non-negativeFloat
, i.e., a value greater than or equal to 0, it will return aPosZFloat
representing that value, wrapped in aSome
. Otherwise, the passedFloat
value is negative, so this method will returnNone
.This factory method differs from the
apply
factory method in thatapply
is implemented via a macro that inspectsFloat
literals at compile time, whereasfrom
inspectsFloat
values at run time.- value
the
Float
to inspect, and if non-negative, return wrapped in aSome[PosZFloat]
.- returns
the specified
Float
value wrapped in aSome[PosZFloat]
, if it is positive, elseNone
.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
implicit
val
posZFloatOrd: Ordering[PosZFloat]
Implicit Ordering instance.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
implicit
def
widenToDouble(poz: PosZFloat): Double
Implicit widening conversion from
PosZFloat
toDouble
.Implicit widening conversion from
PosZFloat
toDouble
.- returns
the
Float
value underlying the specifiedPosZFloat
, widened toDouble
.
-
implicit
def
widenToFloat(poz: PosZFloat): Float
Implicit widening conversion from
PosZFloat
toFloat
.Implicit widening conversion from
PosZFloat
toFloat
.- returns
the
Float
value underlying the specifiedPosZFloat
.
-
implicit
def
widenToPosZDouble(poz: PosZFloat): PosZDouble
Implicit widening conversion from
PosZFloat
toPosZDouble
.Implicit widening conversion from
PosZFloat
toPosZDouble
.- returns
the
Float
value underlying the specifiedPosZFloat
, widened toDouble
and wrapped in aPosZDouble
.