mirror of
https://gitlab.com/cc-ru/ocelot/ocelot-desktop.git
synced 2025-12-20 11:09:20 +01:00
Remove Vector2D.*(Double)
This commit is contained in:
parent
d769b0bde3
commit
c73a0ab9d1
@ -36,9 +36,6 @@ case class Vector2D(x: Float, y: Float) extends Persistable {
|
||||
|
||||
def *(scalar: Float): Vector2D = Vector2D(x * scalar, y * scalar)
|
||||
|
||||
// TODO: remove
|
||||
def *(scalar: Double): Vector2D = Vector2D(x * scalar, y * scalar)
|
||||
|
||||
def /(scalar: Float): Vector2D = Vector2D(x / scalar, y / scalar)
|
||||
|
||||
def snap(v: Float): Vector2D = Vector2D((x / v).floor * v, (y / v).floor * v)
|
||||
|
||||
@ -43,7 +43,7 @@ trait OcelotLogParticleNode extends Node {
|
||||
val offset = time.clamped() * LogParticleMoveDistance
|
||||
val alpha = 1 - time.clamped()
|
||||
|
||||
val r1 = (bounds.w max bounds.h) / math.sqrt(2) + offset + LogParticlePadding
|
||||
val r1 = (bounds.w max bounds.h) / math.sqrt(2).toFloat + offset + LogParticlePadding
|
||||
val r2 = r1 + size
|
||||
|
||||
for (i <- 0 until LogParticleCount) {
|
||||
|
||||
@ -25,7 +25,7 @@ trait SmokeParticleNode extends Node {
|
||||
override def update(dt: Float): Unit = {
|
||||
time += dt
|
||||
offset += (velocity + SmokeParticleVolatilizationSpeed) * dt * speed
|
||||
velocity *= math.pow(SmokeParticleVelocityDamping, dt)
|
||||
velocity *= math.pow(SmokeParticleVelocityDamping, dt).toFloat
|
||||
}
|
||||
|
||||
override def draw(g: Graphics): Unit = {
|
||||
|
||||
@ -82,7 +82,7 @@ class TooltipPool extends Widget {
|
||||
}
|
||||
tooltip.tooltip.position = tooltip.tooltip.position +
|
||||
(UiHandler.mousePosition + offset - tooltip.tooltip.position) *
|
||||
(if (tooltip.tooltip.isClosing) Math.pow(Easing.easeInQuad(tooltip.tooltip.getAlpha), 6) else 1.0)
|
||||
(if (tooltip.tooltip.isClosing) math.pow(Easing.easeInQuad(tooltip.tooltip.getAlpha), 6).toFloat else 1f)
|
||||
})
|
||||
|
||||
if (dueToClean) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user