Remove Vector2D.*(Double)

This commit is contained in:
Fingercomp 2025-08-17 23:22:49 +03:00
parent d769b0bde3
commit c73a0ab9d1
No known key found for this signature in database
GPG Key ID: BBC71CEE45D86E37
4 changed files with 3 additions and 6 deletions

View File

@ -36,9 +36,6 @@ case class Vector2D(x: Float, y: Float) extends Persistable {
def *(scalar: Float): Vector2D = Vector2D(x * scalar, y * scalar) 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 /(scalar: Float): Vector2D = Vector2D(x / scalar, y / scalar)
def snap(v: Float): Vector2D = Vector2D((x / v).floor * v, (y / v).floor * v) def snap(v: Float): Vector2D = Vector2D((x / v).floor * v, (y / v).floor * v)

View File

@ -43,7 +43,7 @@ trait OcelotLogParticleNode extends Node {
val offset = time.clamped() * LogParticleMoveDistance val offset = time.clamped() * LogParticleMoveDistance
val alpha = 1 - time.clamped() 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 val r2 = r1 + size
for (i <- 0 until LogParticleCount) { for (i <- 0 until LogParticleCount) {

View File

@ -25,7 +25,7 @@ trait SmokeParticleNode extends Node {
override def update(dt: Float): Unit = { override def update(dt: Float): Unit = {
time += dt time += dt
offset += (velocity + SmokeParticleVolatilizationSpeed) * dt * speed offset += (velocity + SmokeParticleVolatilizationSpeed) * dt * speed
velocity *= math.pow(SmokeParticleVelocityDamping, dt) velocity *= math.pow(SmokeParticleVelocityDamping, dt).toFloat
} }
override def draw(g: Graphics): Unit = { override def draw(g: Graphics): Unit = {

View File

@ -82,7 +82,7 @@ class TooltipPool extends Widget {
} }
tooltip.tooltip.position = tooltip.tooltip.position + tooltip.tooltip.position = tooltip.tooltip.position +
(UiHandler.mousePosition + offset - 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) { if (dueToClean) {