trait Interpolation[A] extends AnyRef
A trait for interpolating between two values of a certain type over time (from 0 to 1)
- Self Type
- Interpolation[A]
- Alphabetic
- By Inheritance
- Interpolation
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def apply(left: A, right: A, t: Double): A
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(that: Interpolation[A]): Interpolation[A]
Combine with another interpolation of the same type
Combine with another interpolation of the same type
Note that this operation is not commutative. It has a left bias, i.e. the combined interpolations are applied from left to right, always modifying the
left
argument. - final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lens[B](l: Lens[B, A]): Interpolation[B]
Obtain an interpolation of type
B
that varies a value of typeA
“inside” it using the current interpolationObtain an interpolation of type
B
that varies a value of typeA
“inside” it using the current interpolationNote that this operation is left-biased, i.e. it applies the
set
function of the lens to theleft
argument. - def list: Interpolation[List[A]]
Derive an interpolation for a List (that assumes lists of the same length)
- def listMap[B](implicit evidence1: =:=[A, Option[B]], evidence2: =:=[Option[B], A]): Interpolation[ListMap[String, B]]
Derive an interpolation for a ListMap
Derive an interpolation for a ListMap
This method will compare the keys in both maps and use
Option[B]
forleft
andright
arguments associated with each key, based on whether the key is only in the left map (Some, None), only in the right one (None, Some), or in both (Some, Some). - def mapTime(f: (Double) => Double): Interpolation[A]
Map the time interval with the given function
Map the time interval with the given function
For example, the function (_ * 2) will make the interpolation twice faster, and it will happen in the first half of the full time interval.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def option(default: A): Interpolation[Option[A]]
Derive an interpolation for
Option[A]
by providing a default to use in place of a missing argument (i.e.Derive an interpolation for
Option[A]
by providing a default to use in place of a missing argument (i.e. None) - def option(default: (A) => A): Interpolation[Option[A]]
Derive an interpolation for
Option[A]
by providing a function to calculate the missing argument (i.e.Derive an interpolation for
Option[A]
by providing a function to calculate the missing argument (i.e. None) from the remaining one (i.e. Some) - def option(leftOnly: SemiInterpolation[A], rightOnly: SemiInterpolation[A]): Interpolation[Option[A]]
Derive an interpolation for
Option[A]
by providing semi-interpolations for the remaining arguments when eitherleft
orright
arguments areNone
- def optional[B](o: Optional[B, A]): Interpolation[B]
Obtain an interpolation of type
B
that varies a value of typeA
“inside” it using the current interpolationObtain an interpolation of type
B
that varies a value of typeA
“inside” it using the current interpolationNote that this operation is left-biased, i.e. it applies the
set
function of the optional to theleft
argument. - def sample(left: A, right: A, n: Int, inclusive: Boolean = true): LazyList[A]
Sample the range between
left
andright
usingn
values - def seq: Interpolation[Seq[A]]
Derive an interpolation for a sequence (that assumes sequences of the same length)
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def timespan(from: Double, to: Double): Interpolation[A]
Make the interpolation happen in the given timespan, instead of [0; 1]
Make the interpolation happen in the given timespan, instead of [0; 1]
This is essentially a more convenient alternative to
mapTime
. For example,timespan(0, 1.0/2)
is equivalent tomapTime(_ * 2)
. - def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withLeft(left: A): SemiInterpolation[A]
Derive a semi-interpolation by using a fixed
left
argument - def withLeft(rightToLeft: (A) => A): SemiInterpolation[A]
Derive a semi-interpolation by providing a function to calculate the
left
argument from theright
one - def withRight(right: A): SemiInterpolation[A]
Derive a semi-interpolation by using a fixed
right
argument - def withRight(leftToRight: (A) => A): SemiInterpolation[A]
Derive a semi-interpolation by providing a function to calculate the
right
argument from theleft
one
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)