Move Float x MaterialColor operator
This commit is contained in:
parent
20e50ad7b9
commit
687cb784fe
2 changed files with 3 additions and 2 deletions
|
@ -11,4 +11,6 @@ data class MaterialColor(val r: Float, val g: Float, val b: Float) {
|
|||
companion object {
|
||||
val Black: MaterialColor = MaterialColor(0f, 0f, 0f)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
operator fun Float.times(rhs: MaterialColor) = MaterialColor(this * rhs.r, this * rhs.g, this * rhs.b)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import java.io.File
|
||||
|
||||
operator fun Float.times(rhs: MaterialColor) = MaterialColor(this * rhs.r, this * rhs.g, this * rhs.b)
|
||||
|
||||
data class Ray(val origin: Point, val direction: Vector) {
|
||||
fun at(t: Float) = origin + t * direction
|
||||
|
|
Loading…
Add table
Reference in a new issue